From b835eafc87c1c14117861f90a2a3b4a2f3b1caf6 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Fri, 24 Oct 2014 10:42:01 -0500 Subject: [PATCH] forms: Fix empty value default for ChoiceField --- include/class.forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class.forms.php b/include/class.forms.php index 2ef313db8..6e2ddffc8 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -1833,7 +1833,7 @@ class ChoicesWidget extends Widget { $values = array($values => $this->field->getChoice($values)); } - if ($values === null) + if (!is_array($values)) $values = $have_def ? array($def_key => $choices[$def_key]) : array(); ?> -- GitLab