From 354d13167edb2138099e8e14ce64bcfdb6c97726 Mon Sep 17 00:00:00 2001 From: Artur Weigandt Date: Thu, 27 Feb 2025 12:50:19 +0100 Subject: [PATCH] Update src/Module/Api/Mastodon/Search.php Co-authored-by: Hypolite Petovan --- src/Module/Api/Mastodon/Search.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Module/Api/Mastodon/Search.php b/src/Module/Api/Mastodon/Search.php index c054329dde..d7224ff950 100644 --- a/src/Module/Api/Mastodon/Search.php +++ b/src/Module/Api/Mastodon/Search.php @@ -193,14 +193,10 @@ class Search extends BaseApi $condition = ["`id` IN (SELECT `tid` FROM `post-tag` WHERE `type` = ?) AND `name` LIKE ?", Tag::HASHTAG, $q . '%']; - $tags = DBA::select('tag', ['name'], $condition, $params); + $tags = DBA::selectToArray('tag', ['name'], $condition, $params); $hashtags = []; - if (!is_iterable($tags)) { - return $hashtags; - } - foreach ($tags as $tag) { if ($version == 1) { $hashtags[] = $tag['name']; -- 2.39.5