]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Mastodon/FollowedTags.php
Merge pull request #13176 from MrPetovan/bug/warnings
[friendica.git] / src / Module / Api / Mastodon / FollowedTags.php
index 6e95783c9febf84aff8166c9a32eecda1437f87a..306f87323622c2d4ad5a7c414a17d9f6c0351b4b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -65,9 +65,8 @@ class FollowedTags extends BaseApi
                $saved_searches = DBA::select('search', ['id', 'term'], $condition);
                while ($saved_search = DBA::fetch($saved_searches)) {
                        self::setBoundaries($saved_search['id']);
-                       $tag = ['name' => substr($saved_search['term'], 1)];
 
-                       $hashtag  = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, $tag, [], true);
+                       $hashtag  = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => ltrim($saved_search['term'], '#')], [], true);
                        $return[] = $hashtag->toArray();
                }