This commit is contained in:
2021-03-05 19:01:28 +08:00
parent 48b9f82722
commit 0ba5bc7410
+1 -2
View File
@@ -367,7 +367,7 @@ class Router extends HttpService implements RouterInterface
return null; return null;
} }
if (empty($explode)) { if (empty($explode)) {
return $parent->findNode('/'); return $parent;
} }
while ($value = array_shift($explode)) { while ($value = array_shift($explode)) {
$node = $parent->findNode($value); $node = $parent->findNode($value);
@@ -584,7 +584,6 @@ class Router extends HttpService implements RouterInterface
return null; return null;
} }
$node = $this->tree_search(['*'], $request->getMethod()); $node = $this->tree_search(['*'], $request->getMethod());
var_dump($node);
if (!($node instanceof Node)) { if (!($node instanceof Node)) {
return null; return null;
} }