diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-04-01 16:46:28 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-04-01 16:46:28 +0200 |
commit | 2f8b999750cc700faf03c6aee1c53d1fc4df767f (patch) | |
tree | ef00bf6fd9932fd4fa1fc69e3108a1c5603aa64a /Bugzilla/CGI.pm | |
parent | c6d0d0e31a8b7b0e3c46ddf0a2be7741716d7977 (diff) | |
parent | 45485679f2e173170ed9c0e8a0eae979fe9de067 (diff) | |
download | bugzilla-2f8b999750cc700faf03c6aee1c53d1fc4df767f.tar.gz bugzilla-2f8b999750cc700faf03c6aee1c53d1fc4df767f.tar.xz |
Merge branch 'master' of git://github.com/mozilla-bteam/bmo
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r-- | Bugzilla/CGI.pm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index cd947841e..b0bc15e78 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -600,16 +600,18 @@ sub param { # We don't let CGI.pm warn about list context, but we do it ourselves. local $CGI::LIST_CONTEXT_WARN = 0; - state $has_warned = {}; - - ## no critic (Freenode::Wantarray) - if ( wantarray && @_ ) { - my ( $package, $filename, $line ) = caller; - if ( $package ne 'CGI' && ! $has_warned->{"$filename:$line"}++) { - WARN("Bugzilla::CGI::param called in list context from $package $filename:$line"); + if (0) { + state $has_warned = {}; + + ## no critic (Freenode::Wantarray) + if ( wantarray && @_ ) { + my ( $package, $filename, $line ) = caller; + if ( $package ne 'CGI' && ! $has_warned->{"$filename:$line"}++) { + WARN("Bugzilla::CGI::param called in list context from $package $filename:$line"); + } } + ## use critic } - ## use critic # When we are just requesting the value of a parameter... if (scalar(@_) == 1) { |