This commit is contained in:
2021-09-10 10:17:03 +08:00
parent 8c0050c036
commit bb34789f8f
+3
View File
@@ -507,6 +507,9 @@ class Router extends HttpService implements RouterInterface
} }
if (!isset($node)) { if (!isset($node)) {
$_explode = array_filter(explode('/', $uri->getPath())); $_explode = array_filter(explode('/', $uri->getPath()));
if (empty($_explode)) {
$_explode = ['/'];
}
$node = $this->tree_search($_explode); $node = $this->tree_search($_explode);
} }
return $node; return $node;