Don't count the leading / as a part when counting the elements in the path.

8.0.x
Larry Garfield 2012-08-11 17:21:55 -05:00 committed by effulgentsia
parent 2bf5b4d17e
commit d4641c4a5b
1 changed files with 1 additions and 1 deletions

View File

@ -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);