summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Group.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-10-28 19:33:18 +0200
committerlpsolit%gmail.com <>2005-10-28 19:33:18 +0200
commitcf3aa532ea51a41b02c8ea73db254d01c03280ba (patch)
tree52f60354f60ea59baf6a244edea719b32ef50e17 /Bugzilla/Group.pm
parente942748a69920c86a7eaba517c9a74223da52edb (diff)
downloadbugzilla-cf3aa532ea51a41b02c8ea73db254d01c03280ba.tar.gz
bugzilla-cf3aa532ea51a41b02c8ea73db254d01c03280ba.tar.xz
Bug 314088: Several Bugzilla::Foo->new crash when passing a string instead of a valid ID as a param - Patch by Frédéric Buclin <LpSolit@gmail.com> r=kiko a=justdave
Diffstat (limited to 'Bugzilla/Group.pm')
-rw-r--r--Bugzilla/Group.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm
index cc57fca69..32c4696db 100644
--- a/Bugzilla/Group.pm
+++ b/Bugzilla/Group.pm
@@ -61,7 +61,10 @@ sub _init {
my $id = $param unless (ref $param eq 'HASH');
my $group;
- if (defined $id && detaint_natural($id)) {
+ if (defined $id) {
+ detaint_natural($id)
+ || ThrowCodeError('param_must_be_numeric',
+ {function => 'Bugzilla::Group::_init'});
$group = $dbh->selectrow_hashref(qq{
SELECT $columns FROM groups