summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorBodo-Merle Sandor <sbodomerle@gmail.com>2010-02-20 16:55:37 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2010-02-20 16:55:37 +0100
commit09df4b6fe6b6f589db00aef337d73c270e990bf0 (patch)
tree70c7c29a36758dbf17e6bf70abf1533d90deef9a /Bugzilla
parentb9022b0d22f4f20815dfc946fd784a0db64fdc3c (diff)
downloadbugzilla-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.pm4
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 =