Skip to content

Commit

Permalink
Issue #5093 - Precaution in case an array is parsed.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Nov 1, 2023
1 parent 1c45203 commit 100e28e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e107_handlers/form_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3597,7 +3597,9 @@ public function option($option_title, $value, $selected = false, $options = '')

$options = $this->format_options('option', '', $options);
$options['selected'] = $selected; //comes as separate argument just for convenience
$ltitle = strtolower($option_title);

$ltitle = is_string($option_title) ? strtolower($option_title) : $option_title;

$label = ($ltitle === 'true' || $ltitle === 'false') ? $option_title : defset($option_title, $option_title);

return "<option" . $this->attributes(['value' => $value]) . $this->get_attributes($options) . '>'
Expand Down

0 comments on commit 100e28e

Please sign in to comment.