diff --git a/http-handler/Abstracts/Handler.php b/http-handler/Abstracts/Handler.php index a9f72ac9..1426b80e 100644 --- a/http-handler/Abstracts/Handler.php +++ b/http-handler/Abstracts/Handler.php @@ -44,7 +44,7 @@ abstract class Handler implements RequestHandlerInterface */ protected function execute(ServerRequestInterface $request): ResponseInterface { - if (empty($this->middlewares)) { + if (empty($this->middlewares) || !isset($this->middlewares[$this->offset])) { return $this->dispatcher($request); }