From dcd2c9a7b48f83413eb0a643dd3a89779aa879ad Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sun, 26 Sep 2021 00:37:20 +0800 Subject: [PATCH] 111 --- http-handler/Abstracts/Handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }