diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 3106061e..374a2b52 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -511,7 +511,9 @@ class Router extends HttpService implements RouterInterface */ public function find_path(Request $request): ?Node { - return $this->Branch_search($request); + if ($this->useTree === ROUTER_TREE) { + return $this->Branch_search($request); + } $method = $request->getMethod(); $uri = $request->headers->get('request_uri', '/');