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 a7e1e84 commit 43faadaCopy full SHA for 43faada
src/Bridge/Transformer/ChoiceTransformer.php
@@ -31,10 +31,10 @@ protected function defaultValueFrom(FormInterface $form)
31
$formView = $form->createView();
32
$defaultValueFromChoiceView = \array_reduce(
33
$formView->vars['choices'],
34
- static fn(
+ static fn (
35
?string $carry,
36
ChoiceView $choiceView
37
- ): ?string => (null === $carry && $choiceView->data === $defaultValue) ? $choiceView->value : $carry
+ ): ?string => ($carry === null && $choiceView->data === $defaultValue) ? $choiceView->value : $carry
38
);
39
return $defaultValueFromChoiceView ?? $defaultValue;
40
}
0 commit comments