From: David Mitchell Date: Sat, 22 Aug 2009 16:32:53 +0000 (+0100) Subject: add the CGI "default_value for popup_menu()" fix from 3.45 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=74d3927541bd7b5c13ac3fbd52102728650646df;p=p5sagit%2Fp5-mst-13.2.git add the CGI "default_value for popup_menu()" fix from 3.45 --- diff --git a/lib/CGI.pm b/lib/CGI.pm index 61118bd..008bc7b 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -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;