Explorar o código

[Form] Disabled by reference handling for arrays

Bernhard Schussek %!s(int64=14) %!d(string=hai) anos
pai
achega
59bf50bf41
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Symfony/Component/Form/Form.php

+ 1 - 1
src/Symfony/Component/Form/Form.php

@@ -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);
         }
     }