mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
fix middleware closure reference not working
This commit is contained in:
parent
22d38b783d
commit
75e65b082e
@ -75,8 +75,6 @@ class MiddlewareHandler
|
||||
|
||||
public function getPipeClosure(callable $callback, $stack_id)
|
||||
{
|
||||
unset($this->stack[$stack_id]);
|
||||
/** @noinspection PhpUnnecessaryLocalVariableInspection */
|
||||
$pipe_func = function (array $mid_list, ...$args) use ($callback, $stack_id, &$pipe_func) {
|
||||
$return = true;
|
||||
try {
|
||||
@ -130,6 +128,7 @@ class MiddlewareHandler
|
||||
}
|
||||
return $result ?? $after_result ?? $exception_result ?? null;
|
||||
};
|
||||
unset($this->stack[$stack_id]);
|
||||
return $pipe_func;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user