From c0cce890dc31b54850d0afb99ed378af23fcfd83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 5 Mar 2021 19:12:34 +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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index eb1b73b4..1744c2e6 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -138,7 +138,7 @@ class Router extends HttpService implements RouterInterface $parent = $this->nodes[$method][$first] ?? null; if (empty($parent)) { - $this->nodes[$method][$first] = $this->NodeInstance('/', 0, $method); + $this->nodes[$method][$first] = $parent = $this->NodeInstance('/', 0, $method); } if ($first !== '/') {