]> git.mxchange.org Git - friendica.git/commitdiff
Return early if no items are provided in Content\Conversation->getThreadList
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 11 Jul 2023 13:02:53 +0000 (09:02 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 11 Jul 2023 13:03:52 +0000 (09:03 -0400)
- Address https://github.com/friendica/friendica/issues/13157#issuecomment-1628437859

src/Content/Conversation.php

index b645ecf4b2e5d89312adaa1fb682d43ea5dc01f0..6cad2b9805ba6acbcdb1d7c5f26e31932fa3a93c 100644 (file)
@@ -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 {