From 08e23fa81ffd4e169503513631f86358c1c8a834 Mon Sep 17 00:00:00 2001 From: Denis Sokolov Date: Wed, 25 Dec 2019 12:00:00 +0200 Subject: [PATCH] Revert "Change deprecated pushHandler to prependHandler" This reverts commit 4e8c2138bd29e1347d3634958212328e313fe814. --- examples/example-ajax-only.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/example-ajax-only.php b/examples/example-ajax-only.php index 35b8101..d2884cd 100644 --- a/examples/example-ajax-only.php +++ b/examples/example-ajax-only.php @@ -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: