Browse Source

[Form] fixed error message (closes #1034)

Fabien Potencier 14 năm trước cách đây
mục cha
commit
60b811947b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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) {