File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -655,16 +655,16 @@ public function getNumberOfUnreadCommentsForObjects(string $objectType, array $o
655655 $ query ->andWhere ($ query ->expr ()->eq ('c.verb ' , $ query ->createNamedParameter ($ verb )));
656656 }
657657
658+ $ unreadComments = array_fill_keys ($ objectIds , 0 );
658659 foreach (array_chunk ($ objectIds , 1000 ) as $ chunk ) {
659660 $ query ->setParameter ('ids ' , $ chunk , IQueryBuilder::PARAM_INT_ARRAY );
660- $ result = $ query ->execute ();
661661
662- $ unreadComments += array_fill_keys ( $ objectIds , 0 );
662+ $ result = $ query -> executeQuery ( );
663663 while ($ row = $ result ->fetch ()) {
664664 $ unreadComments [$ row ['object_id ' ]] = (int ) $ row ['num_comments ' ];
665665 }
666+ $ result ->closeCursor ();
666667 }
667- $ result ->closeCursor ();
668668
669669 return $ unreadComments ;
670670 }
You can’t perform that action at this time.
0 commit comments