summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 7d86fe328..ed302a053 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -1649,10 +1649,8 @@ sub _check_product {
}
# Check that the product exists and that the user
# is allowed to enter bugs into this product.
- Bugzilla->user->can_enter_product($name, THROW_ERROR);
- # can_enter_product already does everything that check_product
- # would do for us, so we don't need to use it.
- return new Bugzilla::Product({ name => $name });
+ my $product = Bugzilla->user->can_enter_product($name, THROW_ERROR);
+ return $product;
}
sub _check_priority {