mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
fix for empty $root
This commit is contained in:
parent
0abde01442
commit
e09bae918c
|
|
@ -136,7 +136,7 @@ abstract class Utils
|
|||
} else {
|
||||
$root = $uri->rootUrl();
|
||||
$pattern = '/(\\' . $root . '$|\\' . $root . '\/)/';
|
||||
if (preg_match($pattern, $input, $matches)) {
|
||||
if (!empty($root) && preg_match($pattern, $input, $matches)) {
|
||||
$input = static::replaceFirstOccurrence($matches[0], '', $input);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user