Skip to content

Commit 916424c

Browse files
committed
quality fix
1 parent 719b5dc commit 916424c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Route.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ public function getPathValues(Request $request, string $path = ''): array
170170
$pathValues = [];
171171
$parts = explode('/', ltrim($request->getURI(), '/'));
172172

173-
if(empty($path)) {
174-
$pathParams = $this->pathParams[$path] ?? $this->pathParams[0] ?? [];
173+
if (empty($path)) {
174+
$pathParams = $this->pathParams[$path] ?? \array_values($this->pathParams)[0] ?? [];
175175
} else {
176176
$pathParams = $this->pathParams[$path] ?? [];
177177
}

0 commit comments

Comments
 (0)