From fc11e1a8d7e0ca1f07fbb89dfb77df186a8bf757 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Mon, 25 Nov 2013 14:28:11 +0100 Subject: [PATCH] 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(-) 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'} }; -- 2.47.3