]> git.mxchange.org Git - friendica.git/commitdiff
Fix Notice: "Undefined index: host"
authorMichael <heluecht@pirati.ca>
Sat, 25 Jul 2020 08:07:22 +0000 (08:07 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 25 Jul 2020 08:07:22 +0000 (08:07 +0000)
src/Network/Probe.php

index c41006b1289bc35f98f208f8a0cec90a9ebcdafb..3c43fb28ea5fd033b5dcb983ae676fd66befe363 100644 (file)
@@ -1784,6 +1784,9 @@ class Probe
                $base = $xpath->evaluate('string(/html/head/base/@href)') ?: $base;
 
                $baseParts = parse_url($base);
+               if (empty($baseParts['host'])) {
+                       return $href;
+               }
 
                // Naked domain case (scheme://basehost)
                $path = $baseParts['path'] ?? '/';