summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Comment.pm
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-03-31 09:43:44 +0200
committerByron Jones <glob@mozilla.com>2014-03-31 09:43:44 +0200
commit8e4cf05adac6aa915c7d38d9a1aa93c0c62127b3 (patch)
tree7a062374710967c978fc219730fe04a53fee206e /Bugzilla/Comment.pm
parent52205fd2111f50dbb0079f9679b298d7bd3d7c8f (diff)
downloadbugzilla-8e4cf05adac6aa915c7d38d9a1aa93c0c62127b3.tar.gz
bugzilla-8e4cf05adac6aa915c7d38d9a1aa93c0c62127b3.tar.xz
Bug 987741: deleted comment checking runs before tags are preloaded, triggering excessive database queries
Diffstat (limited to 'Bugzilla/Comment.pm')
-rw-r--r--Bugzilla/Comment.pm3
1 files changed, 3 insertions, 0 deletions
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} //= [];
+ }
}
###############################