1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-29 09:10:23 +02:00

Fixes #5093 - True/False labels on <select> options.

This commit is contained in:
camer0n
2023-11-01 08:07:30 -07:00
parent fb98771b82
commit faa2f8ad34
2 changed files with 11 additions and 2 deletions

View File

@@ -3597,10 +3597,11 @@ var_dump($select_options);*/
$options = $this->format_options('option', '', $options);
$options['selected'] = $selected; //comes as separate argument just for convenience
$ltitle = strtolower($option_title);
$label = ($ltitle === 'true' || $ltitle === 'false') ? $option_title : defset($option_title, $option_title);
return "<option" . $this->attributes(['value' => $value]) . $this->get_attributes($options) . '>'
. defset($option_title, $option_title) .
. $label .
'</option>';
}