From 1530209266c7b8c972fb88fb6611ab05d6d07414 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 13 Sep 2023 04:38:04 +0000 Subject: [PATCH] Initialize array --- src/Module/Conversation/Timeline.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Module/Conversation/Timeline.php b/src/Module/Conversation/Timeline.php index 0456c8e1d0..5ee5a7b674 100644 --- a/src/Module/Conversation/Timeline.php +++ b/src/Module/Conversation/Timeline.php @@ -203,6 +203,7 @@ class Timeline extends BaseModule while (count($selected_items) < $this->itemsPerPage && ++$count < 50 && count($items) > 0) { foreach ($items as $item) { + $numposts[$item['owner-id']] = ($numposts[$item['owner-id']] ?? 0); if (!in_array($item['owner-id'], $reduced) || (($numposts[$item['owner-id']]++ < $maxpostperauthor)) && (count($selected_items) < $this->itemsPerPage)) { $selected_items[] = $item; }