diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php index 3881d1fb8bf7..c5f27b2f4811 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php @@ -165,11 +165,9 @@ public function buildForm(FormBuilderInterface $builder, array $options) } } } else { - foreach ($data as $value) { - if ($choiceList->getChoicesForValues([$value])) { - $knownValues[] = $value; - unset($unknownValues[$value]); - } + foreach ($choiceList->getChoicesForValues($data) as $key => $choice) { + $knownValues[] = $data[$key]; + unset($unknownValues[$data[$key]]); } }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: