From afa7d541ecae3568aef9880916744c5e76aac9bf Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Thu, 25 Feb 2016 17:44:17 -0800 Subject: [PATCH] Fixed notice when running through CLI --- system/src/Grav/Common/Errors/Errors.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Errors/Errors.php b/system/src/Grav/Common/Errors/Errors.php index 688068451..00be73811 100644 --- a/system/src/Grav/Common/Errors/Errors.php +++ b/system/src/Grav/Common/Errors/Errors.php @@ -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;