diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index b611ddc1..c2f79af6 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -92,7 +92,7 @@ class Node extends HttpService { if (is_string($handler) && str_contains($handler, '@')) { list($controller, $action) = explode('@', $handler); - if (!empty($this->namespace)) { + if (!class_exists($controller) || !empty($this->namespace)) { $controller = implode('\\', $this->namespace) . '\\' . $controller; } $this->handler = $this->getReflect($controller, $action);