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
parent d72d5a40
......@@ -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) {
......
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