diff options
author | Bodo-Merle Sandor <sbodomerle@gmail.com> | 2010-02-20 16:55:37 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2010-02-20 16:55:37 +0100 |
commit | 09df4b6fe6b6f589db00aef337d73c270e990bf0 (patch) | |
tree | 70c7c29a36758dbf17e6bf70abf1533d90deef9a /Bugzilla | |
parent | b9022b0d22f4f20815dfc946fd784a0db64fdc3c (diff) | |
download | bugzilla-09df4b6fe6b6f589db00aef337d73c270e990bf0.tar.gz bugzilla-09df4b6fe6b6f589db00aef337d73c270e990bf0.tar.xz |
Bug 547428: SQL error when deleting a product and its related series when it has none
r/a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Product.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index 975af7d5d..46e91aa65 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -298,7 +298,9 @@ sub remove_from_db { WHERE series_categories.name = ?', undef, $self->name); - $dbh->do('DELETE FROM series WHERE ' . $dbh->sql_in('series_id', $series_ids)); + if (scalar @$series_ids) { + $dbh->do('DELETE FROM series WHERE ' . $dbh->sql_in('series_id', $series_ids)); + } # If no subcategory uses this product name, completely purge it. my $in_use = |