diff --git a/src/Error/Middleware/WhoopsHandlerMiddleware.php b/src/Error/Middleware/WhoopsHandlerMiddleware.php index a9c839a..269cfc7 100644 --- a/src/Error/Middleware/WhoopsHandlerMiddleware.php +++ b/src/Error/Middleware/WhoopsHandlerMiddleware.php @@ -24,7 +24,7 @@ class WhoopsHandlerMiddleware extends ErrorHandlerMiddleware { * @return \Psr\Http\Message\ResponseInterface A response */ public function handleException($exception, $request, $response) { - if (!Configure::read('debug')) { + if (!Configure::read('debug') || PHP_SAPI == 'cli') { return parent::handleException($exception, $request, $response); }