Skip to content

Commit cf59ced

Browse files
authored
Update Routes.php
1 parent 3fbcde8 commit cf59ced

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Routes.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ public function match(RouteMap $routes, string $uri, string $requestMethod):? Ro
276276

277277
$parseParams = static function(array $route, string $path) use ($routes): RouteRecord {
278278
$paths = explode('/', $path);
279-
$segments = $routes->tokenizer->splitPath('/', $route['path']);
279+
if (empty($paths[0])) array_shift($paths);
280+
$segments = $routes->tokenizer->splitPath($route['path']);
280281

281282
$route['params'] = [];
282283
foreach ($segments as $i => $segment) {

0 commit comments

Comments
 (0)