瀏覽代碼

[Form] fixed transformation failed exception

Daniel Holmes 14 年之前
父節點
當前提交
dd692c0203
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Bridge/Doctrine/Form/DataTransformer/EntityToIdTransformer.php

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

@@ -70,7 +70,7 @@ class EntityToIdTransformer implements DataTransformerInterface
         }
 
         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;