Skip to content
Permalink
Browse files

Backing out type checking in choose_from_menu and choose_from_menu ne…

…sted. Perhaps will add casting to string on both sides later
  • Loading branch information...
mjollnir_
mjollnir_ committed Jan 16, 2006
1 parent abfd14d commit bd905b45689247bf8e684c19077e0b61a4b97afb
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/weblib.php
@@ -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 === '') {

0 comments on commit bd905b4

Please sign in to comment.
You can’t perform that action at this time.