Selaa lähdekoodia

[Form] fixed transformation failed exception

Daniel Holmes 14 vuotta sitten
vanhempi
commit
dd692c0203

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

@@ -70,7 +70,7 @@ class EntityToIdTransformer implements DataTransformerInterface
         }
         }
 
 
         if (!($entity = $this->choiceList->getEntity($key))) {
         if (!($entity = $this->choiceList->getEntity($key))) {
-            throw new TransformationFailedException('The entity with key "%s" could not be found', $key);
+            throw new TransformationFailedException(sprintf('The entity with key "%s" could not be found', $key));
         }
         }
 
 
         return $entity;
         return $entity;