[Form] Disabled by reference handling for arrays

This commit is contained in:
Bernhard Schussek 2011-02-07 17:44:16 +01:00 committed by Fabien Potencier
parent ef43b22546
commit 59bf50bf41

View File

@ -895,7 +895,7 @@ class Form extends Field implements \IteratorAggregate, FormInterface
// Don't update parent if data is a composite type (object or array)
// and "by_reference" option is true, because then we expect that
// we are working with a reference to the parent's data
if (!(is_object($data) || is_array($data)) || !$this->getOption('by_reference')) {
if (!is_object($data) || !$this->getOption('by_reference')) {
parent::writeProperty($objectOrArray);
}
}