Skip to content
Snippets Groups Projects
Commit b835eafc authored by Jared Hancock's avatar Jared Hancock
Browse files

forms: Fix empty value default for ChoiceField

parent d249dc51
No related branches found
No related tags found
No related merge requests found
......@@ -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();
?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment