Backing out type checking in choose_from_menu and choose_from_menu nested. Perhaps will add casting to string on both sides later

This commit is contained in:
mjollnir_ 2006-01-16 09:05:23 +00:00
parent abfd14da26
commit bd905b4568

View File

@ -687,7 +687,7 @@ function choose_from_menu ($options, $name, $selected='', $nothing='choose', $sc
if (!empty($options)) {
foreach ($options as $value => $label) {
$output .= ' <option value="'. $value .'"';
if ($value === $selected) {
if ((string)$value == (string)$selected) {
$output .= ' selected="selected"';
}
if ($label === '') {
@ -739,7 +739,7 @@ function choose_from_menu_nested($options,$name,$selected='',$nothing='choose',$
$output .= ' <optgroup label="'.$section.'">'."\n";
foreach ($values as $value => $label) {
$output .= ' <option value="'. $value .'"';
if ($value === $selected) {
if ($value == $selected) {
$output .= ' selected="selected"';
}
if ($label === '') {