Got working E_WARNING-in-production going. YAY!

This commit is contained in:
Brady Wetherington 2023-02-14 20:00:06 -08:00
parent 039d159cbd
commit a1b0eaf128

View file

@ -114,10 +114,10 @@ $config = [
'access_token' => env('ROLLBAR_TOKEN'), 'access_token' => env('ROLLBAR_TOKEN'),
'level' => env('ROLLBAR_LEVEL', 'error'), 'level' => env('ROLLBAR_LEVEL', 'error'),
'check_ignore' => function($isUncaught, $args, $payload) { 'check_ignore' => function($isUncaught, $args, $payload) {
if (method_exists($args, 'getMessage') && strstr($args->getMessage(), 'Declaration of')) { if (App::environment('production') && get_class($args) == Rollbar\ErrorWrapper::class && $args->errorLevel == E_WARNING ) {
return true; \Log::info("IGNORING E_WARNING in production mode: ".$args->getMessage());
return true; // "TRUE - you should ignore it!"
} }
return false; return false;
}, },
], ],