From: Frédéric Buclin Date: Mon, 25 Nov 2013 13:28:11 +0000 (+0100) Subject: Fix bustage due to bug 793963. Some very old bugs may have no comments X-Git-Tag: bugzilla-4.5.2~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc11e1a8d7e0ca1f07fbb89dfb77df186a8bf757;p=thirdparty%2Fbugzilla.git Fix bustage due to bug 793963. Some very old bugs may have no comments --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 9669352cd0..a7be3812df 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'} };