Commit 8bd53405 authored by drumm's avatar drumm
Browse files

#98720 by chx. Better checking of selected options.

parent f58b4e1a
......@@ -929,7 +929,7 @@ function form_select_options($element, $choices = NULL) {
}
else {
$key = (string)$key;
if ($value_valid && ($element['#value'] == $key || ($value_is_array && in_array($key, $element['#value'])))) {
if ($value_valid && ((string)$element['#value'] === $key || ($value_is_array && in_array($key, $element['#value'])))) {
$selected = ' selected="selected"';
}
else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment