Revert "Change deprecated pushHandler to prependHandler"

This reverts commit 4e8c2138bd.
This commit is contained in:
Denis Sokolov
2019-12-25 12:00:00 +02:00
parent 5830721878
commit 08e23fa81f
+3 -3
View File
@@ -26,7 +26,7 @@ $run = new Run();
// We want the error page to be shown by default, if this is a
// regular request, so that's the first thing to go into the stack:
$run->prependHandler(new PrettyPageHandler());
$run->pushHandler(new PrettyPageHandler());
// Now, we want a second handler that will run before the error page,
// and immediately return an error message in JSON format, if something
@@ -42,8 +42,8 @@ if (\Whoops\Util\Misc::isAjaxRequest()) {
// tl;dr: error[] becomes errors[[]]
$jsonHandler->setJsonApi(true);
// And prepend it into the stack:
$run->prependHandler($jsonHandler);
// And push it into the stack:
$run->pushHandler($jsonHandler);
}
// That's it! Register Whoops and throw a dummy exception: