From: Hypolite Petovan Date: Tue, 11 Jul 2023 13:02:53 +0000 (-0400) Subject: Return early if no items are provided in Content\Conversation->getThreadList X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=248148af991380968596e97fc1c22176fe70ef65;p=friendica.git Return early if no items are provided in Content\Conversation->getThreadList - Address https://github.com/friendica/friendica/issues/13157#issuecomment-1628437859 --- 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 {