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'];