From 71dc665c34180ebb737fc300cb489dc78b4c8684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 21 Apr 2021 10:19:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Route/Reduce.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/HttpServer/Route/Reduce.php b/HttpServer/Route/Reduce.php index dfe94bee..d71a5cf3 100644 --- a/HttpServer/Route/Reduce.php +++ b/HttpServer/Route/Reduce.php @@ -6,7 +6,6 @@ namespace HttpServer\Route; use Closure; use HttpServer\IInterface\After; -use HttpServer\IInterface\Middleware; use Snowflake\Core\Json; class Reduce @@ -65,7 +64,7 @@ class Reduce public static function passable($stack, $pipe): Closure { return function ($passable) use ($stack, $pipe) { - if (!($pipe instanceof Middleware)) { + if ($pipe instanceof Closure) { return call_user_func($pipe, $passable, $stack); } else { return $pipe->onHandler($passable, $stack);