We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 870f153 commit 3ac0adeCopy full SHA for 3ac0ade
src/ppeco/router/Router.php
@@ -12,7 +12,7 @@ public static function route(#[Language("regex")] string $regex,
12
callable $router) {
13
$regex = str_replace("/", "\\/", $regex);
14
if(isset($_SERVER["REQUEST_URI"])&&
15
- preg_match("/$regex$/", $_SERVER["REQUEST_URI"], $data)){
+ preg_match("/$regex$/", strtok($_SERVER["REQUEST_URI"], '?'), $data)){
16
(self::$output??function($output) { echo $output; })->call(new Router(), $router($data));
17
exit;
18
}
0 commit comments