mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
fix for url() function breaking when path contains root
This commit is contained in:
parent
2c252c43b4
commit
34ab8408fa
|
|
@ -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, '/');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user