Parcourir la source

[Form] Fixed EntitiesToArrayTransformer::reverseTransform() to accept NULL values

Bernhard Schussek il y a 14 ans
Parent
commit
d3c8647f49

+ 1 - 1
src/Symfony/Bridge/Doctrine/Form/DataTransformer/EntitiesToArrayTransformer.php

@@ -76,7 +76,7 @@ class EntitiesToArrayTransformer implements DataTransformerInterface
     {
         $collection = new ArrayCollection();
 
-        if ('' === $keys) {
+        if ('' === $keys || null === $keys) {
             return $collection;
         }