浏览代码

[Form] Fixed failing choice field tests

Bernhard Schussek 14 年之前
父节点
当前提交
65353bd81e
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;
             }