1
0
mirror of https://github.com/silverstripe/silverstripe-framework synced 2024-10-22 14:05:37 +02:00

Merge pull request from open-sausages/pulls/4.0/chain-out-there

BUG Fix registered shutdown function not handling responsibility for outputting redirection response
This commit is contained in:
Chris Joe 2017-07-13 16:10:57 +12:00 committed by GitHub
commit 243304c633

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();