Merge pull request #9727 from annando/notice
Fix a notice when the path is empty
This commit is contained in:
commit
422de110e6
1 changed files with 19 additions and 17 deletions
|
@ -1801,6 +1801,7 @@ class Probe
|
||||||
|
|
||||||
$hrefParts = parse_url($href);
|
$hrefParts = parse_url($href);
|
||||||
|
|
||||||
|
if (!empty($hrefParts['path'])) {
|
||||||
// Root path case (/path) including relative scheme case (//host/path)
|
// Root path case (/path) including relative scheme case (//host/path)
|
||||||
if ($hrefParts['path'] && $hrefParts['path'][0] == '/') {
|
if ($hrefParts['path'] && $hrefParts['path'][0] == '/') {
|
||||||
$path = $hrefParts['path'];
|
$path = $hrefParts['path'];
|
||||||
|
@ -1822,6 +1823,7 @@ class Probe
|
||||||
|
|
||||||
$path = '/' . implode('/', $absolutes);
|
$path = '/' . implode('/', $absolutes);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Relative scheme case (//host/path)
|
// Relative scheme case (//host/path)
|
||||||
$baseParts['host'] = $hrefParts['host'] ?? $baseParts['host'];
|
$baseParts['host'] = $hrefParts['host'] ?? $baseParts['host'];
|
||||||
|
|
Loading…
Reference in a new issue