diff options
author | mozilla%colinogilvie.co.uk <> | 2006-05-17 07:08:30 +0200 |
---|---|---|
committer | mozilla%colinogilvie.co.uk <> | 2006-05-17 07:08:30 +0200 |
commit | 7640676d0bd7f09e52e645c454b7fed8eb937c20 (patch) | |
tree | 67160169a9bea4d2d7f167f1b23ae47575aa18f5 | |
parent | d72d5a40777fa7e75aeeb145e8fb8a65b97de291 (diff) | |
download | bugzilla-7640676d0bd7f09e52e645c454b7fed8eb937c20.tar.gz bugzilla-7640676d0bd7f09e52e645c454b7fed8eb937c20.tar.xz |
Bug 337747: config.cgi fails with an SQL error in Bugzilla::Keyword with no keywords defined
Patch by Colin Ogilvie <colin.ogilvie@gmail.com>; r=mkanat; a=justdave
-rw-r--r-- | Bugzilla/Keyword.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Bugzilla/Keyword.pm b/Bugzilla/Keyword.pm index fb2e3ae66..946d43c14 100644 --- a/Bugzilla/Keyword.pm +++ b/Bugzilla/Keyword.pm @@ -82,7 +82,7 @@ sub new_from_list { my $dbh = Bugzilla->dbh; my $keywords; - if ($id_list) { + if (@$id_list) { my @detainted_ids; foreach my $id (@$id_list) { detaint_natural($id) || @@ -94,9 +94,7 @@ sub new_from_list { "SELECT $columns FROM keyworddefs WHERE id IN (" . join(',', @detainted_ids) . ")", {Slice=>{}}); } else { - ThrowCodeError('bad_arg', - {argument => 'id_list', - function => 'Bugzilla::Keyword::new_from_list'}); + return []; } foreach my $keyword (@$keywords) { |