]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 526271: Uninitialized value in can_enter_product() due to a missing argument...
authorlpsolit%gmail.com <>
Tue, 3 Nov 2009 19:46:13 +0000 (19:46 +0000)
committerlpsolit%gmail.com <>
Tue, 3 Nov 2009 19:46:13 +0000 (19:46 +0000)
Bugzilla/User.pm
buglist.cgi

index 9cb53fe346a1383debddd6959ec03c5c00d80e1b..3843062fbfdd77ca15b82f69ae9fed63450bf4b1 100644 (file)
@@ -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;
index 60713b0358bbbe9dc4894f33677d266fda4e1033..a8103a1e0f95aa841dae03b1b021f50974c523b6 100755 (executable)
@@ -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;
 }