We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f20fb1 commit 46d28cdCopy full SHA for 46d28cd
src/Symfony/Bridge/Propel1/Form/DataTransformer/CollectionToArrayTransformer.php
@@ -35,7 +35,11 @@ public function transform($collection)
35
throw new UnexpectedTypeException($collection, '\PropelCollection');
36
}
37
38
- return $collection->toArray();
+ // A PropelCollection is ArrayAccess, to cast the collection
39
+ // into array is enough to transform the collection in an array.
40
+ // Never use toArray() on a PropelCollection as it puts all data
41
+ // in array, not just the collection.
42
+ return (array) $collection;
43
44
45
public function reverseTransform($array)
0 commit comments