From: lpsolit%gmail.com <> Date: Fri, 22 Aug 2008 20:38:06 +0000 (+0000) Subject: Bug 247936: Creating a product/component which already existed crashes when adding... X-Git-Tag: bugzilla-3.0.6~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=888665629e339d9000158dd7e8fc869b054b1c0e;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 877f69866e..a9a37d4038 100644 --- a/Bugzilla/Series.pm +++ b/Bugzilla/Series.pm @@ -125,6 +125,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 {