diff options
author | Pami Ketolainen <pami.ketolainen@jollamobile.com> | 2014-09-18 17:08:07 +0800 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2014-09-18 17:08:07 +0800 |
commit | c07333d9c122bd6751e31dae5a7c49901f6518b2 (patch) | |
tree | 3d19b5f95e0d8db87b3a5b827fc2c10223479f81 /Bugzilla/CGI.pm | |
parent | af46080505c3103888846c59551f41e0af823bb1 (diff) | |
download | bugs-c07333d9c122bd6751e31dae5a7c49901f6518b2.tar bugs-c07333d9c122bd6751e31dae5a7c49901f6518b2.tar.gz bugs-c07333d9c122bd6751e31dae5a7c49901f6518b2.tar.bz2 bugs-c07333d9c122bd6751e31dae5a7c49901f6518b2.tar.xz bugs-c07333d9c122bd6751e31dae5a7c49901f6518b2.zip |
Bug 1068521: "Use of uninitialized value" warnings
r=glob,a=glob
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r-- | Bugzilla/CGI.pm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 79e3e053b..18181f489 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -373,10 +373,7 @@ sub param { if (!scalar(@result) && $self->request_method && $self->request_method eq 'POST') { - # Some servers fail to set the QUERY_STRING parameter, which - # causes undef issues - $ENV{'QUERY_STRING'} = '' unless exists $ENV{'QUERY_STRING'}; - @result = $self->SUPER::url_param(@_); + @result = $self->url_param(@_); } # Fix UTF-8-ness of input parameters. @@ -401,6 +398,14 @@ sub param { return $self->SUPER::param(@_); } +sub url_param { + my $self = shift; + # Some servers fail to set the QUERY_STRING parameter, which + # causes undef issues + $ENV{'QUERY_STRING'} //= ''; + return $self->SUPER::url_param(@_); +} + sub _fix_utf8 { my $input = shift; # The is_utf8 is here in case CGI gets smart about utf8 someday. @@ -732,6 +737,8 @@ L<CGI|CGI>, L<CGI::Cookie|CGI::Cookie> =item param +=item url_param + =item header =back |