1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

Merge pull request #5336 from rubencm/ticket/12629

[ticket/12629] Add debug.errors_show
This commit is contained in:
Marc Alexander
2018-12-03 21:18:59 +01:00
committed by GitHub
6 changed files with 8 additions and 5 deletions

View File

@@ -3269,6 +3269,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)
@@ -3289,7 +3290,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.show_errors') ? E_ALL : error_reporting())) == 0)
{
return;
}
@@ -3347,7 +3348,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.show_errors') || isset($auth) && $auth->acl_get('a_'))
{
$msg_text = $log_text;