mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/12629] Add debug.errors_show
PHPBB3-12629
This commit is contained in:
parent
1c406c70e0
commit
43141a0d92
3 changed files with 5 additions and 2 deletions
|
@ -8,6 +8,7 @@ core:
|
||||||
exceptions: true
|
exceptions: true
|
||||||
load_time: true
|
load_time: true
|
||||||
sql_explain: true
|
sql_explain: true
|
||||||
|
errors_show: true
|
||||||
|
|
||||||
twig:
|
twig:
|
||||||
debug: true
|
debug: true
|
||||||
|
|
|
@ -3252,6 +3252,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
{
|
{
|
||||||
global $cache, $db, $auth, $template, $config, $user, $request;
|
global $cache, $db, $auth, $template, $config, $user, $request;
|
||||||
global $phpbb_root_path, $msg_title, $msg_long_text, $phpbb_log;
|
global $phpbb_root_path, $msg_title, $msg_long_text, $phpbb_log;
|
||||||
|
global $phpbb_container;
|
||||||
|
|
||||||
// Do not display notices if we suppress them via @
|
// 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)
|
if (error_reporting() == 0 && $errno != E_USER_ERROR && $errno != E_USER_WARNING && $errno != E_USER_NOTICE)
|
||||||
|
@ -3272,7 +3273,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
|
|
||||||
// Check the error reporting level and return if the error level does not match
|
// 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 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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3330,7 +3331,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||||
$log_text .= '<br /><br />BACKTRACE<br />' . $backtrace;
|
$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;
|
$msg_text = $log_text;
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ class container_configuration implements ConfigurationInterface
|
||||||
->booleanNode('exceptions')->defaultValue(false)->end()
|
->booleanNode('exceptions')->defaultValue(false)->end()
|
||||||
->booleanNode('load_time')->defaultValue(false)->end()
|
->booleanNode('load_time')->defaultValue(false)->end()
|
||||||
->booleanNode('sql_explain')->defaultValue(false)->end()
|
->booleanNode('sql_explain')->defaultValue(false)->end()
|
||||||
|
->booleanNode('errors_show')->defaultValue(false)->end()
|
||||||
->end()
|
->end()
|
||||||
->end()
|
->end()
|
||||||
->arrayNode('twig')
|
->arrayNode('twig')
|
||||||
|
|
Loading…
Add table
Reference in a new issue