From d93528100c457bcfcb092a01dcb141957d9a119e Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Fri, 10 Aug 2007 02:20:47 +0000 Subject: [PATCH] Fixed php notice git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39821 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/Form.php b/forms/Form.php index 590df6fba..55e8971ca 100644 --- a/forms/Form.php +++ b/forms/Form.php @@ -455,7 +455,7 @@ class Form extends ViewableData { $dataFields = $this->fields->dataFields(); if($dataFields) foreach($dataFields as $field) { $name = $field->Name(); - $val = $o ? $object->$name : $object[$name]; + $val = $o ? $object->$name : (isset($object[$name]) ? $object[$name] : null); if($name && $val) $field->setValue($val); } }