diff --git a/app/Exceptions/ExceptionHandler.php b/app/Exceptions/ExceptionHandler.php index 79492d1b8..55f172d0f 100644 --- a/app/Exceptions/ExceptionHandler.php +++ b/app/Exceptions/ExceptionHandler.php @@ -87,12 +87,12 @@ class ExceptionHandler extends Handler public function report(Exception $e) { - if (!setting_value('visiosoft.module.advs::disable_sentry') - && app()->bound('sentry') - && $this->shouldReport($e) - && env('SENTRY_LARAVEL_DSN')) { - - app('sentry')->captureException($e); + if (app()->bound('sentry') + && $this->shouldReport($e) + && env('SENTRY_LARAVEL_DSN')) { + if (!setting_value('visiosoft.module.advs::disable_sentry')) { + app('sentry')->captureException($e); + } } parent::report($e);