Commit 9a5f5918 authored by Damien Nozay's avatar Damien Nozay Committed by Dave Lawrence

Bug 904467 - error when %recipients is empty (e.g. after bugmail_recipients empties it)

r/a=glob
parent cf84d586
...@@ -186,6 +186,8 @@ sub Send { ...@@ -186,6 +186,8 @@ sub Send {
{ bug => $bug, recipients => \%recipients, { bug => $bug, recipients => \%recipients,
users => \%user_cache, diffs => \@diffs }); users => \%user_cache, diffs => \@diffs });
# We should not assume %recipients to have any entries.
if (scalar keys %recipients) {
# Find all those user-watching anyone on the current list, who is not # Find all those user-watching anyone on the current list, who is not
# on it already themselves. # on it already themselves.
my $involved = join(",", keys %recipients); my $involved = join(",", keys %recipients);
...@@ -202,6 +204,7 @@ sub Send { ...@@ -202,6 +204,7 @@ sub Send {
} }
push(@{$watching{$watch->[0]}}, $watch->[1]); push(@{$watching{$watch->[0]}}, $watch->[1]);
} }
}
# Global watcher # Global watcher
my @watchers = split(/[,\s]+/, Bugzilla->params->{'globalwatchers'}); my @watchers = split(/[,\s]+/, Bugzilla->params->{'globalwatchers'});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment