If an option is null, don't keep it because it may get turned to an empty array.

This commit is contained in:
Nathan Gray 2010-01-15 16:10:55 +00:00
parent c32beca725
commit 7c72754631

View File

@ -231,6 +231,9 @@ class ajax_select_widget
if(is_numeric($value)) { if(is_numeric($value)) {
$value = (string)$value; $value = (string)$value;
} }
if($value === null) {
unset($options[$key]);
}
} }
$options = $GLOBALS['egw']->js->convert_phparray_jsarray("options['$name']", $options, true); $options = $GLOBALS['egw']->js->convert_phparray_jsarray("options['$name']", $options, true);
$GLOBALS['egw']->js->set_onload("if(!options) { $GLOBALS['egw']->js->set_onload("if(!options) {