From 8e4cf05adac6aa915c7d38d9a1aa93c0c62127b3 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Mon, 31 Mar 2014 15:43:44 +0800 Subject: Bug 987741: deleted comment checking runs before tags are preloaded, triggering excessive database queries --- Bugzilla/Comment.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm index 30f0252b3..979019541 100644 --- a/Bugzilla/Comment.pm +++ b/Bugzilla/Comment.pm @@ -177,6 +177,9 @@ sub preload { foreach my $row (@$rows) { $comment_map{$row->[0]}->{tags} = [ split(/,/, $row->[1]) ]; } + foreach my $comment (@$comments) { + $comment->{tags} //= []; + } } ############################### -- cgit v1.2.3-24-g4f1b