From 2b3d9fb410b0468259ecfd0e5f9852f1c0c5b225 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 5 Feb 2008 05:24:20 +0000 Subject: Bug 415663: Flag->snapshot() calls Flag->match() with attach_id being undefined when editing bug flags - Patch by Frédéric Buclin a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Flag.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 1fc2a6827..00e40e33f 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -215,6 +215,11 @@ sub match { $criteria->{'attach_id'} = IS_NULL; } } + # Flag->snapshot() calls Flag->match() with bug_id and attach_id + # as hash keys, even if attach_id is undefined. + if (exists $criteria->{'attach_id'} && !defined $criteria->{'attach_id'}) { + $criteria->{'attach_id'} = IS_NULL; + } return $class->SUPER::match(@_); } -- cgit v1.2.3-24-g4f1b