From bc4423498a1262e2bb5101392aac9ab89ead5710 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 11 Jan 2023 14:20:31 -0700 Subject: [PATCH] Fix option groups only kept the first group --- api/src/Etemplate/Widget/Select.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Select.php b/api/src/Etemplate/Widget/Select.php index 4617741749..91de44b564 100644 --- a/api/src/Etemplate/Widget/Select.php +++ b/api/src/Etemplate/Widget/Select.php @@ -429,7 +429,7 @@ class Select extends Etemplate\Widget // so check here, as we re-index // Duplicates might happen if app programmer isn't paying attention and // either uses the same ID in the template, or adds the options twice - $check_value = (string)(is_array($label) && array_key_exists('value', $label) ? $label['value'] : $value); + $check_value = (string)(is_array($label) && array_key_exists('value', $label) && !is_array($label['value']) ? $label['value'] : $value); if (isset($values[$check_value])) { unset($options[$value]);