Parcourir la source

[Form] Fixed reference to \Traversable

Jeremy Mikola il y a 15 ans
Parent
commit
5b2e92c215
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/Symfony/Components/Form/CollectionField.php

+ 1 - 1
src/Symfony/Components/Form/CollectionField.php

@@ -53,7 +53,7 @@ class CollectionField extends FieldGroup
 
     public function setData($collection)
     {
-        if (!is_array($collection) && !$collection instanceof Traversable) {
+        if (!is_array($collection) && !$collection instanceof \Traversable) {
             throw new UnexpectedTypeException('The data must be an array');
         }