From 100e28ed2b4465c27b12c78403ef071fc80a8b39 Mon Sep 17 00:00:00 2001 From: camer0n Date: Wed, 1 Nov 2023 13:20:51 -0700 Subject: [PATCH] Issue #5093 - Precaution in case an array is parsed. --- e107_handlers/form_handler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index e72884b89..b6ef4da11 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -3597,7 +3597,9 @@ var_dump($select_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 "attributes(['value' => $value]) . $this->get_attributes($options) . '>'