From fb2e7943c7045ea72f347e00892dda1a96e027c2 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Tue, 31 Aug 2021 01:14:17 +0800 Subject: [PATCH] 111 --- http-helper/Route/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-helper/Route/Router.php b/http-helper/Route/Router.php index f1dd2649..8a290ded 100644 --- a/http-helper/Route/Router.php +++ b/http-helper/Route/Router.php @@ -391,7 +391,7 @@ class Router extends HttpService implements RouterInterface if (empty($this->nodes)) { return null; } - $parent = $this->nodes[array_shift($explode)]; + $parent = $this->nodes[array_shift($explode)] ?? null; if (!($parent instanceof Node)) { return null; }