summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/BugMail.pm15
1 files changed, 9 insertions, 6 deletions
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;