This commit is contained in:
2020-10-20 16:16:53 +08:00
parent 7badc06055
commit d3878cafa5
+2 -4
View File
@@ -477,10 +477,8 @@ class Router extends Application implements RouterInterface
{ {
try { try {
if ($this->reading) { if ($this->reading) {
return send(self::NOT_FOUND, 502); $response = send(self::NOT_FOUND, 502);
} } else if (!($node = $this->find_path(\request()))) {
/** @var Node $node */
if (!($node = $this->find_path(\request()))) {
$response = send(self::NOT_FOUND, 404); $response = send(self::NOT_FOUND, 404);
} else { } else {
$response = send($node->dispatch(), 200); $response = send($node->dispatch(), 200);