Fixed notice when running through CLI

This commit is contained in:
Djamil Legato
2016-02-25 17:44:17 -08:00
parent de8302aafa
commit afa7d541ec

View File

@@ -14,7 +14,7 @@ class Errors
{
$grav = Grav::instance();
$config = $grav['config']->get('system.errors');
$jsonRequest = $_SERVER && $_SERVER['HTTP_ACCEPT'] && $_SERVER['HTTP_ACCEPT'] == 'application/json';
$jsonRequest = $_SERVER && isset($_SERVER['HTTP_ACCEPT']) && $_SERVER['HTTP_ACCEPT'] == 'application/json';
// Setup Whoops-based error handler
$whoops = new \Whoops\Run;