Fix a notice when the path is empty

2022.09-rc
Michael 2020-12-31 07:54:56 +00:00
rodzic 934f69a426
commit fec5f2c217
1 zmienionych plików z 19 dodań i 17 usunięć

Wyświetl plik

@ -1801,6 +1801,7 @@ class Probe
$hrefParts = parse_url($href);
if (!empty($hrefParts['path'])) {
// Root path case (/path) including relative scheme case (//host/path)
if ($hrefParts['path'] && $hrefParts['path'][0] == '/') {
$path = $hrefParts['path'];
@ -1822,6 +1823,7 @@ class Probe
$path = '/' . implode('/', $absolutes);
}
}
// Relative scheme case (//host/path)
$baseParts['host'] = $hrefParts['host'] ?? $baseParts['host'];