mirror of
https://github.com/filp/whoops.git
synced 2026-08-17 11:25:05 +00:00
Revert "Change deprecated pushHandler to prependHandler"
This reverts commit 4e8c2138bd.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user