]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 415663: Flag->snapshot() calls Flag->match() with attach_id being undefined when...
authorlpsolit%gmail.com <>
Tue, 5 Feb 2008 05:24:20 +0000 (05:24 +0000)
committerlpsolit%gmail.com <>
Tue, 5 Feb 2008 05:24:20 +0000 (05:24 +0000)
Bugzilla/Flag.pm

index 1fc2a6827f43844ab344e559f883aca2a3740ef4..00e40e33f9eec63d59ab87c24c4f69cacd0eee69 100644 (file)
@@ -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(@_);
 }