]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Mastodon/Search.php
Merge pull request #13176 from MrPetovan/bug/warnings
[friendica.git] / src / Module / Api / Mastodon / Search.php
index c35e33062bd954cad41d86e89dcda012fc80516b..956e3d73b82a22562a2149cca1218c79689ed03f 100644 (file)
@@ -115,7 +115,7 @@ class Search extends BaseApi
                }
 
                $accounts = [];
-               foreach (Contact::searchByName($q, '', $following ? $uid : 0, $limit, $offset) as $contact) {
+               foreach (Contact::searchByName($q, '', $following ? $uid : 0, false, $limit, $offset) as $contact) {
                        $accounts[] = DI::mstdnAccount()->createFromContactId($contact['id'], $uid);
                }
 
@@ -183,8 +183,8 @@ class Search extends BaseApi
                        self::setBoundaries($item['uri-id']);
                        try {
                                $statuses[] = DI::mstdnStatus()->createFromUriId($item['uri-id'], $uid, $display_quotes);
-                       } catch (\Throwable $th) {
-                               Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
+                       } catch (\Exception $exception) {
+                               Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
                        }
                }
                DBA::close($items);