]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Term.php
Merge pull request #7760 from annando/fix-fatal
[friendica.git] / src / Model / Term.php
index 4e2b571cef21d775c163275870741a79f7ad901c..01169c52265b0f235d4a41ebab8bbbb4d4a7af83 100644 (file)
@@ -82,7 +82,7 @@ class Term
                                $limit
                        );
 
-                       if (DBA::isResult($tags)) {
+                       if (DBA::isResult($tagsStmt)) {
                                $tags = DBA::toArray($tagsStmt);
                                Cache::set('global_trending_tags', $tags, Cache::HOUR);
                        }
@@ -127,7 +127,7 @@ class Term
                                $limit
                        );
 
-                       if (DBA::isResult($tags)) {
+                       if (DBA::isResult($tagsStmt)) {
                                $tags = DBA::toArray($tagsStmt);
                                Cache::set('local_trending_tags', $tags, Cache::HOUR);
                        }
@@ -210,7 +210,7 @@ class Term
        {
                $profile_base = System::baseUrl();
                $profile_data = parse_url($profile_base);
-               $profile_path = defaults($profile_data, 'path', '');
+               $profile_path = $profile_data['path'] ?? '';
                $profile_base_friendica = $profile_data['host'] . $profile_path . '/profile/';
                $profile_base_diaspora = $profile_data['host'] . $profile_path . '/u/';