From e95677aec5423f961a3eabf7a7476a6a4a06d0d9 Mon Sep 17 00:00:00 2001 From: osaajani <> Date: Wed, 31 May 2023 18:43:18 +0200 Subject: [PATCH] . --- descartes/Router.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/descartes/Router.php b/descartes/Router.php index 89b84fa..a88bea4 100644 --- a/descartes/Router.php +++ b/descartes/Router.php @@ -99,7 +99,7 @@ foreach ($method_routes as $route) { - $route_regex = preg_replReflectionNamedTypeace('#\\\{(.+)\\\}#iU', '([^/]+)', preg_quote($route, '#')); + $route_regex = preg_replace('#\\\{(.+)\\\}#iU', '([^/]+)', preg_quote($route, '#')); $route_regex = preg_replace('#/$#', '/?', $route_regex); $match = preg_match('#^' . $route_regex . '$#U', $url); @@ -249,6 +249,7 @@ continue; } + $type = $parameter->getType(); $type = $type ?? false; $type = ($type instanceof \ReflectionNamedType) ? $type->getName() : $type;