Skip to content

Commit 3ac0ade

Browse files
committed
Update Router.php
1 parent 870f153 commit 3ac0ade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ppeco/router/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static function route(#[Language("regex")] string $regex,
1212
callable $router) {
1313
$regex = str_replace("/", "\\/", $regex);
1414
if(isset($_SERVER["REQUEST_URI"])&&
15-
preg_match("/$regex$/", $_SERVER["REQUEST_URI"], $data)){
15+
preg_match("/$regex$/", strtok($_SERVER["REQUEST_URI"], '?'), $data)){
1616
(self::$output??function($output) { echo $output; })->call(new Router(), $router($data));
1717
exit;
1818
}

0 commit comments

Comments
 (0)