]> git.mxchange.org Git - friendica.git/commitdiff
Check for empty baseurl
authorMichael <heluecht@pirati.ca>
Wed, 5 Aug 2020 07:51:15 +0000 (07:51 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 5 Aug 2020 07:51:15 +0000 (07:51 +0000)
src/Network/Probe.php

index 53418ecb61fe60f4c7f0344d66fe1b8784c32a31..c4f4e57f29bb15f329f336350465dc0edc621601 100644 (file)
@@ -2044,9 +2044,13 @@ class Probe
         */
        private static function updateFromNoScrape(array $data)
        {
+               if (empty($data['baseurl'])) {
+                       return '';
+               }
+
                // Check the 'noscrape' endpoint when it is a Friendica server
                $gserver = DBA::selectFirst('gserver', ['noscrape'], ["`nurl` = ? AND `noscrape` != ''",
-               Strings::normaliseLink($data['baseurl'])]);
+                       Strings::normaliseLink($data['baseurl'])]);
                if (!DBA::isResult($gserver)) {
                        return '';
                }