Skip to content
Snippets Groups Projects

Issue #3355182: Potentially Invalid array_search() call in Multiselect.php

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -90,7 +90,7 @@ class Multiselect extends Select {
case 'selected':
if ($value_valid && ((!$value_is_array && (string) $element['#value'] === $key || ($value_is_array && in_array($key, $element['#value']))) || $empty_choice)) {
if ($value_is_array) {
$options[array_search($key, $element['#value'])] = [
$options[$key] = [
'type' => 'option',
'value' => $key,
'label' => $choice,
Loading