]> git.mxchange.org Git - friendica.git/commitdiff
Update src/Module/Api/Mastodon/Search.php
authorArtur Weigandt <Art4@users.noreply.github.com>
Thu, 27 Feb 2025 11:50:19 +0000 (12:50 +0100)
committerGitHub <noreply@github.com>
Thu, 27 Feb 2025 11:50:19 +0000 (12:50 +0100)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Module/Api/Mastodon/Search.php

index c054329ddea6598fd5f63cc81fc36333c9b03381..d7224ff950be536184c65a16db5391dd774a3667 100644 (file)
@@ -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'];