mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
a26099f6f5
commit
0b68356854
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user