Ver código fonte

[Form] fixed Form::bind() when no values are submitted

Fabien Potencier 14 anos atrás
pai
commit
c53ebe7a8e
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      src/Symfony/Component/Form/Form.php

+ 4 - 0
src/Symfony/Component/Form/Form.php

@@ -177,6 +177,10 @@ class Form extends FieldGroup
             $taintedFiles = self::convertFileInformation(self::fixPhpFilesArray($taintedFiles));
         }
 
+        if (null === $taintedValues) {
+            $taintedValues = array();
+        }
+
         $this->doBind(self::deepArrayUnion($taintedValues, $taintedFiles));
 
         if ($this->getParent() === null) {