From fc11e1a8d7e0ca1f07fbb89dfb77df186a8bf757 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 25 Nov 2013 14:28:11 +0100 Subject: Fix bustage due to bug 793963. Some very old bugs may have no comments --- Bugzilla/Bug.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Bug.pm') 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'} }; -- cgit v1.2.3-24-g4f1b