add the CGI "default_value for popup_menu()" fix from 3.45
authorDavid Mitchell <davem@iabyn.com>
Sat, 22 Aug 2009 16:32:53 +0000 (17:32 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sat, 22 Aug 2009 17:20:32 +0000 (18:20 +0100)
(cherry picked from commit 74d3927541bd7b5c13ac3fbd52102728650646df)

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;