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:
Sean Harvey 2008-08-20 05:10:15 +00:00
parent d69c3d6a1a
commit 700cb7c68b

View File

@ -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() . "\" />";