From ed629ca0a2680ebeed503ca7d071fbf8ab8dfbec Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 3 Nov 2009 19:46:13 +0000 Subject: [PATCH] =?utf8?q?Bug=20526271:=20Uninitialized=20value=20in=20can?= =?utf8?q?=5Fenter=5Fproduct()=20due=20to=20a=20missing=20argument=20-=20P?= =?utf8?q?atch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r=3Dghendricks=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/User.pm | 1 + buglist.cgi | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 9cb53fe346..3843062fbf 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -714,6 +714,7 @@ sub get_selectable_classifications { sub can_enter_product { my ($self, $input, $warn) = @_; my $dbh = Bugzilla->dbh; + $warn ||= 0; if (!defined $input) { return unless $warn == THROW_ERROR; diff --git a/buglist.cgi b/buglist.cgi index 60713b0358..a8103a1e0f 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -1101,7 +1101,7 @@ elsif (my @product_input = $cgi->param('product')) { } # We only want the template to use it if the user can actually # enter bugs against it. -if (Bugzilla->user->can_enter_product($one_product)) { +if ($one_product && Bugzilla->user->can_enter_product($one_product)) { $vars->{'one_product'} = $one_product; } -- 2.47.3