Return early if no items are provided in Content\Conversation->getThreadList

- Address https://github.com/friendica/friendica/issues/13157#issuecomment-1628437859
This commit is contained in:
Hypolite Petovan 2023-07-11 09:02:53 -04:00
parent 91d63213ae
commit 248148af99
1 changed files with 4 additions and 0 deletions

View 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 {