From: lpsolit%gmail.com <> Date: Fri, 22 Aug 2008 20:36:22 +0000 (+0000) Subject: Bug 247936: Creating a product/component which already existed crashes when adding... X-Git-Tag: bugzilla-3.2rc2~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb33bc671287318fe0243cca2c96f7f7d0a60407;p=thirdparty%2Fbugzilla.git Bug 247936: Creating a product/component which already existed crashes when adding series - Patch by Frédéric Buclin r/a=mkanat --- diff --git a/Bugzilla/Series.pm b/Bugzilla/Series.pm index a99c442fe7..95d0a8f50d 100644 --- a/Bugzilla/Series.pm +++ b/Bugzilla/Series.pm @@ -124,6 +124,10 @@ sub initFromParameters { ($self->{'series_id'}, $self->{'category'}, $self->{'subcategory'}, $self->{'name'}, $self->{'creator'}, $self->{'frequency'}, $self->{'query'}, $self->{'public'}) = @_; + + # If the first parameter is undefined, check if this series already + # exists and update it series_id accordingly + $self->{'series_id'} ||= $self->existsInDatabase(); } sub initFromCGI {