Handle 0 defaults properly

This commit is contained in:
Chris 2020-05-24 17:54:08 +01:00
parent 13e7c201f4
commit 40b571c117

View File

@ -726,7 +726,7 @@ sub build_optionlist {
my $opttem = "<option value=\"***value***\"***sel******title***>***name***</option>\n";
# Force arrayref for default
$default = [ $default ] if($default && ref($default) ne "ARRAY");
$default = [ $default ] if(defined($default) && ref($default) ne "ARRAY");
# Convert default to a hash for faster lookup
my %selected = ();