parents-merge 35035 - Form::loadDataFrom() didn't like fields called 'Name'

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@45050 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2007-11-19 01:27:35 +00:00
parent 0b68356854
commit be3ed220ac

View File

@ -489,7 +489,7 @@ class Form extends ViewableData {
if($name = $field->Name()) {
if($o) {
// this was failing with the field named 'Name'
$val = $object->getField($name);
$val = $object->__get($name);
} else {
$val = isset($object[$name]) ? $object[$name] : null;
}