fix for url() function breaking when path contains root

This commit is contained in:
Andy Miller 2022-03-03 11:21:03 -07:00
parent 2c252c43b4
commit 34ab8408fa
No known key found for this signature in database
GPG Key ID: 9F2CF38AEBDB0AE0

View File

@ -134,10 +134,10 @@ abstract class Utils
$resource = $locator->findResource($input, false);
}
} else {
$root = $uri->rootUrl();
$root = $uri->rootUrl() . '/';
if (static::startsWith($input, $root)) {
$input = static::replaceFirstOccurrence($root, '', $input);
$input = static::replaceFirstOccurrence($root, '/', $input);
}
$input = ltrim($input, '/');