mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR PHP notice fix for FileIFrameField->Field()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61160 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d69c3d6a1a
commit
700cb7c68b
@ -10,7 +10,7 @@ class FileIFrameField extends FileField {
|
||||
public function Field() {
|
||||
$data = $this->form->getRecord();
|
||||
|
||||
if($data->ID && is_numeric($data->ID)) {
|
||||
if($data && $data->ID && is_numeric($data->ID)) {
|
||||
$idxField = $this->name . 'ID';
|
||||
$hiddenField = "<input type=\"hidden\" id=\"" . $this->id() . "\" name=\"$idxField\" value=\"" . $this->attrValue() . "\" />";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user