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

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

View File

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