diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 23911d3a..13e1d605 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -121,7 +121,7 @@ class Node extends HttpService */ public function createDispatch(): Closure { - return function () { + return static function () { $dispatchParam = Context::getContext('dispatch-param'); if (empty($dispatchParam)) { $dispatchParam = [\request()];