From 248148af991380968596e97fc1c22176fe70ef65 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 11 Jul 2023 09:02:53 -0400 Subject: [PATCH] Return early if no items are provided in Content\Conversation->getThreadList - Address https://github.com/friendica/friendica/issues/13157#issuecomment-1628437859 --- src/Content/Conversation.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index b645ecf4b2..6cad2b9805 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -589,6 +589,10 @@ class Conversation */ public function getThreadList(array $items, string $mode, bool $preview, bool $pagedrop, string $formSecurityToken): array { + if (!$items) { + return []; + } + if (in_array($mode, [self::MODE_FILED, self::MODE_SEARCH, self::MODE_CONTACT_POSTS])) { $threads = $this->getContextLessThreadList($items, $mode, $preview, $pagedrop, $formSecurityToken); } else {