]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 361875: Use of uninitialized value in numeric eq (==) at Bugzilla/User.pm line...
authorlpsolit%gmail.com <>
Tue, 28 Nov 2006 02:21:46 +0000 (02:21 +0000)
committerlpsolit%gmail.com <>
Tue, 28 Nov 2006 02:21:46 +0000 (02:21 +0000)
Bugzilla/User.pm

index 3c18f190820bb4661dddeec9d016ed3190e6260c..05b96dd29f376177279f772b27b644d9c1fa0aa2 100644 (file)
@@ -1461,16 +1461,16 @@ sub wants_mail {
     # No mail if there are no events
     return 0 if !scalar(@$events);
 
-    # Skip DB query if relationship is explicit
-    return 1 if $relationship == REL_GLOBAL_WATCHER;
-    
-    my $dbh = Bugzilla->dbh;
-    
     # If a relationship isn't given, default to REL_ANY.
     if (!defined($relationship)) {
         $relationship = REL_ANY;
     }
-    
+
+    # Skip DB query if relationship is explicit
+    return 1 if $relationship == REL_GLOBAL_WATCHER;
+
+    my $dbh = Bugzilla->dbh;
+
     my $wants_mail = 
         $dbh->selectrow_array('SELECT 1
                                  FROM email_setting