mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
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:
parent
abfd14da26
commit
bd905b4568
@ -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 === '') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user