Bläddra i källkod

[Form] fixed error message (closes #1034)

Fabien Potencier 14 år sedan
förälder
incheckning
60b811947b
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      src/Symfony/Component/Form/FormFactory.php

+ 1 - 1
src/Symfony/Component/Form/FormFactory.php

@@ -252,7 +252,7 @@ class FormFactory implements FormFactoryInterface
         }
 
         if (count($diff) > 0) {
-            throw new CreationException(sprintf('The option "%s" does not exist', $diff[0]));
+            throw new CreationException(sprintf('The option "%s" does not exist', current($diff)));
         }
 
         foreach ($optionValues as $option => $allowedValues) {