Skip to content

Commit

Permalink
Revert "Change deprecated pushHandler to prependHandler"
Browse files Browse the repository at this point in the history
This reverts commit 4e8c213.
  • Loading branch information
denis-sokolov committed Dec 25, 2019
1 parent 5830721 commit 08e23fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/example-ajax-only.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

// 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
Expand All @@ -42,8 +42,8 @@
// 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:
Expand Down

0 comments on commit 08e23fa

Please sign in to comment.