BUG Fix registered shutdown function not handling responsibility for outputting redirection response

This commit is contained in:
Damian Mooyman 2017-07-13 15:31:57 +12:00
parent 10f93b71ae
commit 5fcd7d084f
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -61,9 +61,10 @@ class ErrorControlChainMiddleware implements HTTPMiddleware
} }
}) })
// Finally if a token was requested but there was an error while figuring out if it's allowed, do it anyway // Finally if a token was requested but there was an error while figuring out if it's allowed, do it anyway
->thenIfErrored(function () use ($reloadToken, &$result) { ->thenIfErrored(function () use ($reloadToken) {
if ($reloadToken) { if ($reloadToken) {
$result = $reloadToken->reloadWithToken(); $result = $reloadToken->reloadWithToken();
$result->output();
} }
}) })
->execute(); ->execute();