mirror of
https://github.com/getgrav/grav.git
synced 2026-07-06 07:08:57 +02:00
Framework\Route::getRoute() return relative path only if offset isn't 0
This commit is contained in:
@@ -85,7 +85,7 @@ class Route
|
||||
public function getRoute($offset = 0, $length = null)
|
||||
{
|
||||
if ($offset !== 0 || $length !== null) {
|
||||
return implode('/', $this->getRouteParts($offset, $length));
|
||||
return ($offset === 0 ? '/' : '') . implode('/', $this->getRouteParts($offset, $length));
|
||||
}
|
||||
|
||||
return '/' . $this->route;
|
||||
|
||||
Reference in New Issue
Block a user