Merge pull request #8924 from annando/notice
Fix Notice: "Undefined index: host"
This commit is contained in:
commit
9f9e50947a
|
@ -1784,6 +1784,9 @@ class Probe
|
||||||
$base = $xpath->evaluate('string(/html/head/base/@href)') ?: $base;
|
$base = $xpath->evaluate('string(/html/head/base/@href)') ?: $base;
|
||||||
|
|
||||||
$baseParts = parse_url($base);
|
$baseParts = parse_url($base);
|
||||||
|
if (empty($baseParts['host'])) {
|
||||||
|
return $href;
|
||||||
|
}
|
||||||
|
|
||||||
// Naked domain case (scheme://basehost)
|
// Naked domain case (scheme://basehost)
|
||||||
$path = $baseParts['path'] ?? '/';
|
$path = $baseParts['path'] ?? '/';
|
||||||
|
|
Loading…
Reference in a new issue