From ee88638a7dc3bad66049a69354d71816286073df Mon Sep 17 00:00:00 2001 From: "preed%sigkill.com" <> Date: Sat, 15 Feb 2003 16:29:26 +0000 Subject: Bug 192877 - State changes on bugs w/ dependancies cause "Use of uninitialized values" in BugMail.pm; r=justdave, bbaetz, a=justdave --- Bugzilla/BugMail.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index a71effcd2..e16a45139 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -773,28 +773,31 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) { my $difftext = ""; my $diffheader = ""; my $add_diff; + foreach my $diff (@diffparts) { - $add_diff = 0; - if ($diff->{'fieldname'} eq 'estimated_time' || - $diff->{'fieldname'} eq 'remaining_time' || - $diff->{'fieldname'} eq 'work_time') { + if (exists($diff->{'fieldname'}) && + ($diff->{'fieldname'} eq 'estimated_time' || + $diff->{'fieldname'} eq 'remaining_time' || + $diff->{'fieldname'} eq 'work_time')) { if (UserInGroup(Param("timetrackinggroup"), $userid)) { $add_diff = 1; } } else { $add_diff = 1; } + if ($add_diff) { - if ($diffheader ne $diff->{'header'}) { + if (exists($diff->{'header'}) && + ($diffheader ne $diff->{'header'})) { $diffheader = $diff->{'header'}; $difftext .= $diffheader; } $difftext .= $diff->{'text'}; } } - + if ($difftext eq "" && $newcomments eq "") { # Whoops, no differences! return; -- cgit v1.2.3-24-g4f1b