From a1b0eaf128994edbabd23a45d093e6c3822a37a8 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Tue, 14 Feb 2023 20:00:06 -0800 Subject: [PATCH] Got working E_WARNING-in-production going. YAY! --- config/logging.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/logging.php b/config/logging.php index 1e3e3b4932..989925464f 100644 --- a/config/logging.php +++ b/config/logging.php @@ -114,10 +114,10 @@ $config = [ 'access_token' => env('ROLLBAR_TOKEN'), 'level' => env('ROLLBAR_LEVEL', 'error'), 'check_ignore' => function($isUncaught, $args, $payload) { - if (method_exists($args, 'getMessage') && strstr($args->getMessage(), 'Declaration of')) { - return true; + if (App::environment('production') && get_class($args) == Rollbar\ErrorWrapper::class && $args->errorLevel == E_WARNING ) { + \Log::info("IGNORING E_WARNING in production mode: ".$args->getMessage()); + return true; // "TRUE - you should ignore it!" } - return false; }, ],