Test for empty array in htmlOPtions when notifying about not selecting a value

This commit is contained in:
Isaac Connor 2020-10-07 11:22:42 -04:00
parent efd56a2e09
commit b683d5326a
1 changed files with 1 additions and 1 deletions

View File

@ -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;