mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed php notice
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39821 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
858e877858
commit
d93528100c
@ -455,7 +455,7 @@ class Form extends ViewableData {
|
|||||||
$dataFields = $this->fields->dataFields();
|
$dataFields = $this->fields->dataFields();
|
||||||
if($dataFields) foreach($dataFields as $field) {
|
if($dataFields) foreach($dataFields as $field) {
|
||||||
$name = $field->Name();
|
$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);
|
if($name && $val) $field->setValue($val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user