Skip to content

Commit

Permalink
Merge pull request #5 from josbeir/master
Browse files Browse the repository at this point in the history
Disable middleware in cli mode
  • Loading branch information
dereuromark authored Jun 27, 2018
2 parents 9f7bd8d + c22ecd1 commit 42ef92b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Error/Middleware/WhoopsHandlerMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 42ef92b

Please sign in to comment.