Subject: | $cgi->param('buglist', undef, 'C', 'D', undef) does not set param anymore |
The following used to set a param in 3.17 however it fails in 3.19+:
$cgi->param('buglist', undef, 'C', 'D', undef);
print join(', ', $cgi->param('buglist') ) . "\n";
This is due to the following change in the unreleased 3.18:
3. Fixed param() so that param(-name=>'foo',-values=>[]) sets the
parameter to empty list.
I've attached a small testscript to demonstrate the problem. This is
breaking bug searching in Bugzilla 2.22+ and possible other version as well.
Subject: | foo.pl |
#!/usr/bin/perl
use CGI;
my $cgi = new CGI;
$cgi->param('buglist', '__closed__');
print join(', ', $cgi->param('buglist')) . "\n";
$cgi->param('buglist', 'A', 'B', undef);
print join(', ', $cgi->param('buglist') ) . "\n";
# Should print , C, D
# does in 3.17, fails in 3.19+
$cgi->param('buglist', undef, 'C', 'D', undef);
print join(', ', $cgi->param('buglist') ) . "\n";