From 73f306162e60138eba06d320d82418a57e559dfb Mon Sep 17 00:00:00 2001 From: Mirco Babini Date: Thu, 13 Jan 2022 19:41:23 +0100 Subject: [PATCH] Permit to silence errors (ex. warnings...) --- src/setup.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/setup.php b/src/setup.php index 3264690..78c869d 100644 --- a/src/setup.php +++ b/src/setup.php @@ -37,6 +37,11 @@ function _setup_whoops() { $whoops = new Run(); $whoops->pushHandler( new PrettyPageHandler() ); $whoops->register(); + + if ( defined( 'DEBUG_TOOLKIT_WHOOPS_SILENCE_ERRORS' ) ) { + // Ignore some levels on all the website + $whoops->silenceErrorsInPaths( '/.*/', $levels = DEBUG_TOOLKIT_WHOOPS_SILENCE_ERRORS ); + } } /**