diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/config/development/config.yml | 1 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 5 | ||||
-rw-r--r-- | phpBB/phpbb/di/extension/container_configuration.php | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/config/development/config.yml b/phpBB/config/development/config.yml index 76da151d50..bce4355e3d 100644 --- a/phpBB/config/development/config.yml +++ b/phpBB/config/development/config.yml @@ -10,6 +10,7 @@ core: load_time: true sql_explain: true memory: true + errors_show: true twig: debug: true diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b30f500a4e..1bc4ae2ee4 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3320,6 +3320,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) { global $cache, $db, $auth, $template, $config, $user, $request; global $phpbb_root_path, $msg_title, $msg_long_text, $phpbb_log; + global $phpbb_container; // Do not display notices if we suppress them via @ if (error_reporting() == 0 && $errno != E_USER_ERROR && $errno != E_USER_WARNING && $errno != E_USER_NOTICE) @@ -3340,7 +3341,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) // Check the error reporting level and return if the error level does not match // If DEBUG is defined the default level is E_ALL - if (($errno & ((defined('DEBUG')) ? E_ALL : error_reporting())) == 0) + if (($errno & ($phpbb_container->getParameter('debug.errors_show') ? E_ALL : error_reporting())) == 0) { return; } @@ -3398,7 +3399,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) $log_text .= '<br /><br />BACKTRACE<br />' . $backtrace; } - if (defined('IN_INSTALL') || defined('DEBUG') || isset($auth) && $auth->acl_get('a_')) + if (defined('IN_INSTALL') || $phpbb_container->getParameter('debug.errors_show') || isset($auth) && $auth->acl_get('a_')) { $msg_text = $log_text; diff --git a/phpBB/phpbb/di/extension/container_configuration.php b/phpBB/phpbb/di/extension/container_configuration.php index 131ec70c8d..9f8cf34311 100644 --- a/phpBB/phpbb/di/extension/container_configuration.php +++ b/phpBB/phpbb/di/extension/container_configuration.php @@ -39,6 +39,7 @@ class container_configuration implements ConfigurationInterface ->booleanNode('load_time')->defaultValue(false)->end() ->booleanNode('sql_explain')->defaultValue(false)->end() ->booleanNode('memory')->defaultValue(false)->end() + ->booleanNode('errors_show')->defaultValue(false)->end() ->end() ->end() ->arrayNode('twig') |