We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8458495 + c0c5340 commit 09503b0Copy full SHA for 09503b0
1 file changed
lib/private/Comments/Manager.php
@@ -655,16 +655,16 @@ public function getNumberOfUnreadCommentsForObjects(string $objectType, array $o
655
$query->andWhere($query->expr()->eq('c.verb', $query->createNamedParameter($verb)));
656
}
657
658
+ $unreadComments = array_fill_keys($objectIds, 0);
659
foreach (array_chunk($objectIds, 1000) as $chunk) {
660
$query->setParameter('ids', $chunk, IQueryBuilder::PARAM_INT_ARRAY);
- $result = $query->execute();
661
662
- $unreadComments += array_fill_keys($objectIds, 0);
+ $result = $query->executeQuery();
663
while ($row = $result->fetch()) {
664
$unreadComments[$row['object_id']] = (int) $row['num_comments'];
665
666
+ $result->closeCursor();
667
- $result->closeCursor();
668
669
return $unreadComments;
670
0 commit comments