From 00c9550465eacdad6e91bda8414ca7cc64abd477 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 23 Sep 2022 09:39:50 -0600 Subject: [PATCH] Fix selects without empty_label were not allowed to be empty in some cases, even without required=true For example select-account multiple=true, or customfield select-account with rows > 1 would give error "'' is NOT allowed ('not found')" --- api/src/Etemplate/Widget/Select.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Select.php b/api/src/Etemplate/Widget/Select.php index 7645a239d2..9f11df835c 100644 --- a/api/src/Etemplate/Widget/Select.php +++ b/api/src/Etemplate/Widget/Select.php @@ -171,7 +171,8 @@ class Select extends Etemplate\Widget } $allowed = array_map('strval', $allowed); - if (!$multiple || $this->attrs['multiple'] === "dynamic") $allowed[] = ''; + // Add empty as an option, we check for required value later + $allowed[] = ''; foreach((array) $value as $val) {