Merge pull request #343 from ExplodingCabbage/patch-1

Fix gh-pages JsonResponseHandler example
This commit is contained in:
Denis Sokolov
2015-12-09 23:53:44 +02:00
+3 -1
View File
@@ -107,7 +107,9 @@ $run->pushHandler($handler);
// first in the stack, it will be executed before the error
// page handler, and will have a chance to decide if anything
// needs to be done.
$run->pushHandler(new JsonResponseHandler);
if (Whoops\isAjaxRequest()) {
$run->pushHandler(new JsonResponseHandler);
}
// Register the handler with PHP, and you're set!
$run->register();