Commit ed629ca0 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 526271: Uninitialized value in can_enter_product() due to a missing argument…

Bug 526271: Uninitialized value in can_enter_product() due to a missing argument - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
parent e0deda75
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment