]> git.mxchange.org Git - friendica.git/commitdiff
Quit earlier in ProbeURL->getFeedLink if body is empty
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 23 Feb 2021 21:06:34 +0000 (16:06 -0500)
committerGitHub <noreply@github.com>
Tue, 23 Feb 2021 21:06:34 +0000 (16:06 -0500)
src/Network/Probe.php

index 3eb60648337ce10d649636ff0317e351f0e3442c..23eaf299ca47e266de2bc85ddb6cdeedc1316dc1 100644 (file)
@@ -1754,10 +1754,11 @@ class Probe
         */
        public static function getFeedLink(string $url, string $body)
        {
-               $doc = new DOMDocument();
                if (empty($body)) {
                        return '';
                }
+
+               $doc = new DOMDocument();
                if (!@$doc->loadHTML($body)) {
                        return false;
                }