diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 75a3daee..48187991 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -94,7 +94,7 @@ class Node extends HttpService } else { $this->handler = $handler; } - if (!empty($this->handler)) { + if (!empty($this->handler) && is_array($this->handler)) { $this->callback = di(Middlewares::class)->callerMiddlewares( $this->handler[0], $this->handler[1], $this->createDispatch() );