Improve handling of undef default

This commit is contained in:
Chris 2020-05-24 17:51:25 +01:00
parent 2bcc883280
commit b7e6e8c5d5

View File

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