Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 0dcecda

Browse files
Fixed fatal bug with query params
1 parent 8d35909 commit 0dcecda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Router.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ private function patternMatches(string $pattern, string $uri, array|null &$match
381381
*/
382382
private function getMatchingRoutes(ServerRequest $request, array $routes, bool $findOne = false): array
383383
{
384-
$uri = $request->getRequestTarget();
384+
$uri = explode("?", $request->getRequestTarget())[0];
385385

386386
$matched = [];
387387

@@ -412,4 +412,4 @@ private function getMatchingRoutes(ServerRequest $request, array $routes, bool $
412412

413413
return $matched;
414414
}
415-
}
415+
}

0 commit comments

Comments
 (0)