This commit is contained in:
William 2023-01-30 21:29:29 +01:00
parent a640b11b66
commit 028908053a

View File

@ -12,13 +12,9 @@ abstract class Route {
array_map(strtoupper(...), explode('|', $methods)) array_map(strtoupper(...), explode('|', $methods))
)) return; )) return;
static $request_path_parts;
if (!isset($request_path_parts)) {
$request_path_parts = explode('/', urldecode( $request_path_parts = explode('/', urldecode(
strtok($_SERVER['REQUEST_URI'], '?') strtok($_SERVER['REQUEST_URI'], '?')
) ));
);
}
$path_parts = explode('/', $path); $path_parts = explode('/', $path);
$callback_args = []; $callback_args = [];
for ($i=0; $i < count($path_parts); $i++) { for ($i=0; $i < count($path_parts); $i++) {