From a359886e057b506be62db908ef95d9dfac848866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 13 Oct 2020 13:36:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Route/Router.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 04b3b1e2..2aff33f8 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -71,7 +71,9 @@ class Router extends Application implements RouterInterface if (!isset($this->nodes[$method])) { $this->nodes[$method] = []; } - if (Config::get('router', false, ROUTER_HASH) == ROUTER_TREE) { + + $useTree = Config::get('router', false, ROUTER_HASH); + if ($useTree == ROUTER_TREE) { return $this->tree($path, $handler, $method); } else { return $this->hash($path, $handler, $method);