Index: functions.php =================================================================== --- functions.php (revision 10508) +++ functions.php (working copy) @@ -3531,11 +3531,16 @@ } } + if (defined('DEBUG_EXTRA') && $auth->acl_get('a_')) + { + $msg_text .= '

BACKTRACE
' . get_backtrace() . '
' . "\n"; + } + if (defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) { // let's avoid loops $db->sql_return_on_error(true); - add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $msg_text); + add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $msg_text . ((!defined('DEBUG_EXTRA') || !$auth->acl_get('a_')) ? '

BACKTRACE
' . get_backtrace() . '
' . "\n" : '')); $db->sql_return_on_error(false); }