summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2013-11-25 14:28:11 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2013-11-25 14:28:11 +0100
commitfc11e1a8d7e0ca1f07fbb89dfb77df186a8bf757 (patch)
treef64eec7af0e94e0636bc86d64dd36211d644de54 /Bugzilla/Bug.pm
parent77beed22fed7c66c31f1f5b1c1c19713fdbb4256 (diff)
downloadbugzilla-fc11e1a8d7e0ca1f07fbb89dfb77df186a8bf757.tar.gz
bugzilla-fc11e1a8d7e0ca1f07fbb89dfb77df186a8bf757.tar.xz
Fix bustage due to bug 793963. Some very old bugs may have no comments
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 9669352cd..a7be3812d 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -3416,7 +3416,8 @@ sub comments {
$comment->{count} = $count++;
$comment->{bug} = $self;
}
- Bugzilla::Comment->preload($self->{'comments'});
+ # Some bugs may have no comments when upgrading old installations.
+ Bugzilla::Comment->preload($self->{'comments'}) if $count;
}
my @comments = @{ $self->{'comments'} };