From 2b3d9fb410b0468259ecfd0e5f9852f1c0c5b225 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 5 Feb 2008 05:24:20 +0000 Subject: [PATCH] =?utf8?q?Bug=20415663:=20Flag->snapshot()=20calls=20Flag-?= =?utf8?q?>match()=20with=20attach=5Fid=20being=20undefined=20when=20editi?= =?utf8?q?ng=20bug=20flags=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9r?= =?utf8?q?ic=20Buclin=20=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/Flag.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 1fc2a6827f..00e40e33f9 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(@_); } -- 2.47.3