Преглед на файлове

[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) {