Merge pull request #8924 from annando/notice

Fix Notice:  "Undefined index: host"
This commit is contained in:
Hypolite Petovan 2020-07-25 07:07:43 -04:00 committed by GitHub
commit 9f9e50947a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View 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'] ?? '/';