浏览代码

[Form] fixed error message

Fabien Potencier 14 年之前
父节点
当前提交
27beb3bd15
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php

+ 3 - 3
src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php

@@ -80,7 +80,7 @@ class ResizeFormListener implements EventSubscriberInterface
         }
 
         if (!is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) {
-            throw new UnexpectedTypeException($data, 'array or \Traversable or \ArrayAccess');
+            throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)');
         }
 
         // First remove all rows
@@ -106,7 +106,7 @@ class ResizeFormListener implements EventSubscriberInterface
         }
 
         if (!is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) {
-            throw new UnexpectedTypeException($data, 'array or \Traversable or \ArrayAccess');
+            throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)');
         }
 
         // Remove all empty rows
@@ -140,7 +140,7 @@ class ResizeFormListener implements EventSubscriberInterface
         }
 
         if (!is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) {
-            throw new UnexpectedTypeException($data, 'array or \Traversable or \ArrayAccess');
+            throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)');
         }
 
         if ($this->allowDelete) {