summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-02-05 06:24:20 +0100
committerlpsolit%gmail.com <>2008-02-05 06:24:20 +0100
commit2b3d9fb410b0468259ecfd0e5f9852f1c0c5b225 (patch)
tree6daa9d2f1b84f860e8ed24ba594a98d29ed3fa77
parent24c32fe3d8141ac056c6350ae148cfc30ddadfea (diff)
downloadbugzilla-2b3d9fb410b0468259ecfd0e5f9852f1c0c5b225.tar.gz
bugzilla-2b3d9fb410b0468259ecfd0e5f9852f1c0c5b225.tar.xz
Bug 415663: Flag->snapshot() calls Flag->match() with attach_id being undefined when editing bug flags - Patch by Frédéric Buclin <LpSolit@gmail.com> a=LpSolit
-rw-r--r--Bugzilla/Flag.pm5
1 files changed, 5 insertions, 0 deletions
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(@_);
}