Test for empty array in htmlOPtions when notifying about not selecting a value
This commit is contained in:
parent
efd56a2e09
commit
b683d5326a
|
@ -525,7 +525,7 @@ function htmlOptions($options, $values) {
|
|||
'>'.htmlspecialchars($text, ENT_COMPAT | ENT_HTML401, ini_get('default_charset'), false).'</option>
|
||||
';
|
||||
} # end foreach options
|
||||
if ( $values and ! $has_selected ) {
|
||||
if ( $values and ((!is_array($values)) or count($values) ) and ! $has_selected ) {
|
||||
ZM\Warning('Specified value '.print_r($values, true).' not in contents: '.print_r($options, true));
|
||||
}
|
||||
return $options_html;
|
||||
|
|
Loading…
Reference in New Issue