File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ trait Dispatcher
31
31
* @var mixed The value for the not found route.
32
32
*/
33
33
protected $ notFound ;
34
-
34
+
35
35
36
36
/**
37
37
* Dispatcher constructor.
@@ -68,8 +68,7 @@ public function dispatch(ServerRequestInterface $request): ResponseInterface
68
68
69
69
if (!$ this ->notFound ) {
70
70
71
- return $ this ->notFoundResponse ();
72
-
71
+ return $ this ->notFoundResponse ();
73
72
}
74
73
75
74
$ controller ->setCallback ($ this ->notFound );
@@ -78,7 +77,9 @@ public function dispatch(ServerRequestInterface $request): ResponseInterface
78
77
// handle router middlewares
79
78
if (!empty ($ action ['middleware ' ])) {
80
79
81
- $ handler = new RequestHandler ($ this ->response , $ action ['middleware ' ]);
80
+ $ middlewares = array_map (fn ($ m ) => Resolver::resolveClass ($ m ), $ action ['middleware ' ]);
81
+
82
+ $ handler = new RequestHandler ($ this ->response , $ middlewares );
82
83
83
84
$ responseMiddleware = $ this ->runMiddleware ($ this ->request , $ handler );
84
85
You can’t perform that action at this time.
0 commit comments