Don't count the leading / as a part when counting the elements in the path.
parent
2bf5b4d17e
commit
d4641c4a5b
|
@ -31,7 +31,7 @@ class RouteCompiler implements RouteCompilerInterface {
|
|||
|
||||
$pattern_outline = $this->getPatternOutline($route->getPattern());
|
||||
|
||||
$num_parts = count(explode('/', $pattern_outline));
|
||||
$num_parts = count(explode('/', trim($pattern_outline, '/')));
|
||||
|
||||
return new CompiledRoute($route, $fit, $pattern_outline, $num_parts);
|
||||
|
||||
|
|
Loading…
Reference in New Issue