]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GServer.php
Merge pull request #10115 from tobiasd/20210402-credits
[friendica.git] / src / Model / GServer.php
index ca939c176c00fe5b7e83ffed4525ca8165db70b9..6a1a363e34f96580d991d74b6a8294e2d63715fd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -1475,6 +1475,10 @@ class GServer
         */
        private static function analyseRootBody($curlResult, array $serverdata, string $url)
        {
+               if (empty($curlResult->getBody())) {
+                       return $serverdata;
+               }
+
                $doc = new DOMDocument();
                @$doc->loadHTML($curlResult->getBody());
                $xpath = new DOMXPath($doc);
@@ -1793,7 +1797,7 @@ class GServer
                        }
                }
 
-               Logger::info('Protocol for server', ['protocol' => $protocol, 'old' => $old, 'id' => $gsid, 'url' => $gserver['url']]);
+               Logger::info('Protocol for server', ['protocol' => $protocol, 'old' => $old, 'id' => $gsid, 'url' => $gserver['url'], 'callstack' => System::callstack(20)]);
                DBA::update('gserver', ['protocol' => $protocol], ['id' => $gsid]);
        }