aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-10-28 17:33:18 +0000
committerlpsolit%gmail.com <>2005-10-28 17:33:18 +0000
commitcf3aa532ea51a41b02c8ea73db254d01c03280ba (patch)
tree52f60354f60ea59baf6a244edea719b32ef50e17 /Bugzilla/Classification.pm
parentBug 313941: sanitycheck should quote bad values so empty values are apparent (diff)
downloadbugzilla-cf3aa532ea51a41b02c8ea73db254d01c03280ba.tar.gz
bugzilla-cf3aa532ea51a41b02c8ea73db254d01c03280ba.tar.bz2
bugzilla-cf3aa532ea51a41b02c8ea73db254d01c03280ba.zip
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/Classification.pm')
-rw-r--r--Bugzilla/Classification.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/Classification.pm b/Bugzilla/Classification.pm
index e87852ba2..63a826dc3 100644
--- a/Bugzilla/Classification.pm
+++ b/Bugzilla/Classification.pm
@@ -55,7 +55,10 @@ sub _init {
my $id = $param unless (ref $param eq 'HASH');
my $classification;
- if (defined $id && detaint_natural($id)) {
+ if (defined $id) {
+ detaint_natural($id)
+ || ThrowCodeError('param_must_be_numeric',
+ {function => 'Bugzilla::Classification::_init'});
$classification = $dbh->selectrow_hashref(qq{
SELECT $columns FROM classifications