From b683d5326a44020d106c3519b210449b4dfb25aa Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 7 Oct 2020 11:22:42 -0400 Subject: [PATCH] Test for empty array in htmlOPtions when notifying about not selecting a value --- web/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index 875cf1a72..9950c4266 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -525,7 +525,7 @@ function htmlOptions($options, $values) { '>'.htmlspecialchars($text, ENT_COMPAT | ENT_HTML401, ini_get('default_charset'), false).' '; } # 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;