Ticket #5113: patch.patch
| File patch.patch, 0.9 kB (added by Wicked, 1 year ago) |
|---|
-
FormHelper.php
old new 58 58 { 59 59 $html_options = _parse_attributes($html_options); 60 60 61 if ( is_array($selected))61 if (!is_array($selected)) 62 62 { 63 $selected = array _map('strval', array_values($selected));63 $selected = array($seleted); 64 64 } 65 65 66 $selected = array_map('strval', array_values($selected)); 67 $selected_set = array_flip($selected); 68 66 69 $html = ''; 67 70 68 71 if ($value = _get_option($html_options, 'include_custom')) … … 84 87 { 85 88 $option_options = array('value' => $key); 86 89 87 if ( 88 (is_array($selected) && in_array(strval($key), $selected, true)) 89 || 90 (strval($key) == strval($selected)) 91 ) 92 { 90 if (isset($selected_set[strval($key)])) { 93 91 $option_options['selected'] = 'selected'; 94 92 } 95 93

