Commit d4641c4a authored by Crell's avatar Crell Committed by effulgentsia

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

parent 2bf5b4d1
......@@ -31,7 +31,7 @@ public function compile(Route $route) {
$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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment