Skip to content

Commit d518544

Browse files
committed
Merge branch '6.4' into 7.3
* 6.4: pass the empty string instead of null as key to array_key_exists()
2 parents a68e1ad + d5bb7c3 commit d518544

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function getChoicesForValues(array $values): array
105105
$choices = [];
106106

107107
foreach ($values as $i => $givenValue) {
108-
if (\array_key_exists($givenValue, $this->choices)) {
108+
if (\array_key_exists($givenValue ?? '', $this->choices)) {
109109
$choices[$i] = $this->choices[$givenValue];
110110
}
111111
}

0 commit comments

Comments
 (0)