8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ec5b4f commit 93bb427Copy full SHA for 93bb427
src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToValueTransformer.php
@@ -43,13 +43,13 @@ public function reverseTransform($value)
43
throw new TransformationFailedException('Expected a scalar.');
44
}
45
46
+ if (null === $value || '' === $value) {
47
+ return;
48
+ }
49
+
50
$choices = $this->choiceList->getChoicesForValues(array((string) $value));
51
52
if (1 !== count($choices)) {
- if (null === $value || '' === $value) {
- return;
- }
-
53
throw new TransformationFailedException(sprintf('The choice "%s" does not exist or is not unique', $value));
54
55
0 commit comments