Fix gh-pages JsonResponseHandler example

This is correct syntax for the master branch; it shouldn't go live until the changes currently on master are released.
This commit is contained in:
ExplodingCabbage
2015-12-09 19:05:18 +00:00
parent cb6a582f36
commit 79ab8a31ea
+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();