diff options
-rw-r--r-- | Bugzilla/Flag.pm | 5 |
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(@_); } |