Skip to content

Commit 0b5c641

Browse files
committed
Merge branch 'jk/gitweb-with-newer-cgi-multi-param' into maint
"gitweb" used to depend on a behaviour that was deprecated by recent CGI.pm. * jk/gitweb-with-newer-cgi-multi-param: gitweb: hack around CGI's list-context param() handling
2 parents 8d51343 + 13dbf46 commit 0b5c641

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gitweb/gitweb.perl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
use Time::HiRes qw(gettimeofday tv_interval);
2121
binmode STDOUT, ':utf8';
2222

23+
if (!defined($CGI::VERSION) || $CGI::VERSION < 4.08) {
24+
eval 'sub CGI::multi_param { CGI::param(@_) }'
25+
}
26+
2327
our $t0 = [ gettimeofday() ];
2428
our $number_of_git_cmds = 0;
2529

@@ -871,7 +875,7 @@ sub evaluate_query_params {
871875

872876
while (my ($name, $symbol) = each %cgi_param_mapping) {
873877
if ($symbol eq 'opt') {
874-
$input_params{$name} = [ map { decode_utf8($_) } $cgi->param($symbol) ];
878+
$input_params{$name} = [ map { decode_utf8($_) } $cgi->multi_param($symbol) ];
875879
} else {
876880
$input_params{$name} = decode_utf8($cgi->param($symbol));
877881
}

0 commit comments

Comments
 (0)