add the CGI "default_value for popup_menu()" fix from 3.45
David Mitchell [Sat, 22 Aug 2009 16:32:53 +0000 (17:32 +0100)]
lib/CGI.pm

index 61118bd..008bc7b 100644 (file)
@@ -2451,7 +2451,7 @@ sub popup_menu {
 
     if (!$override && defined($self->param($name))) {
        $selected{$self->param($name)}++;
-    } elsif ($default) {
+    } elsif (defined $default) {
        %selected = map {$_=>1} ref($default) eq 'ARRAY' 
                                 ? @$default 
                                 : $default;