Pārlūkot izejas kodu

[Form] Fixed failing choice field tests

Bernhard Schussek 14 gadi atpakaļ
vecāks
revīzija
65353bd81e
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/Symfony/Component/Form/Form.php

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

@@ -201,7 +201,7 @@ class Form extends Field implements \IteratorAggregate, FormInterface
 
         $this->extraFields = array();
 
-        foreach ($data as $name => $value) {
+        foreach ((array)$data as $name => $value) {
             if (!$this->has($name)) {
                 $this->extraFields[] = $name;
             }