mirror of
https://github.com/flarum/core.git
synced 2025-07-26 11:10:41 +02:00
Update RouteCollection.php
This commit is contained in:
@@ -90,11 +90,8 @@ class RouteCollection
|
|||||||
public function getPath($name, array $parameters = [])
|
public function getPath($name, array $parameters = [])
|
||||||
{
|
{
|
||||||
$parts = $this->reverse[$name][0];
|
$parts = $this->reverse[$name][0];
|
||||||
|
|
||||||
array_walk($parts, [$this, 'fixPathPart'], $parameters);
|
array_walk($parts, [$this, 'fixPathPart'], $parameters);
|
||||||
$path = implode('', $parts);
|
$path = '/' . ltrim(implode('', $parts), '/');
|
||||||
|
|
||||||
$path = '/' . ltrim($path, '/');
|
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user