diff options
| author | Henry Sudhof <kellanved@phpbb.com> | 2009-08-05 12:02:18 +0000 |
|---|---|---|
| committer | Henry Sudhof <kellanved@phpbb.com> | 2009-08-05 12:02:18 +0000 |
| commit | 4e9ce7060edad3361db224996adb5a87bf083b69 (patch) | |
| tree | c22c715067b126b78917b0f647898851f3757434 | |
| parent | b6690e51f9a125380cea86f23138ab95db7b51da (diff) | |
| download | forums-4e9ce7060edad3361db224996adb5a87bf083b69.tar forums-4e9ce7060edad3361db224996adb5a87bf083b69.tar.gz forums-4e9ce7060edad3361db224996adb5a87bf083b69.tar.bz2 forums-4e9ce7060edad3361db224996adb5a87bf083b69.tar.xz forums-4e9ce7060edad3361db224996adb5a87bf083b69.zip | |
log general errors in cron, images and when debug is enabled
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9924 89ea8834-ac86-4346-8a33-228a782c2dd0
| -rw-r--r-- | phpBB/includes/functions.php | 8 | ||||
| -rw-r--r-- | phpBB/language/en/acp/common.php | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 13864848a8..e797b279c9 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3505,6 +3505,14 @@ function msg_handler($errno, $msg_text, $errfile, $errline) $l_notify = '<p>Please notify the board administrator or webmaster: <a href="mailto:' . $config['board_contact'] . '">' . $config['board_contact'] . '</a></p>'; } } + + 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); + $db->sql_return_on_error(false); + } garbage_collection(); diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index f03298642a..83778d90bf 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -562,6 +562,8 @@ $lang = array_merge($lang, array( 'LOG_FORUM_MOVE_UP' => '<strong>Moved forum</strong> %1$s <strong>above</strong> %2$s', 'LOG_FORUM_SYNC' => '<strong>Re-synchronised forum</strong><br />» %s', + 'LOG_GENERAL_ERROR' => '<strong>A general error occured</strong>: %1$s <br />» %2$s', + 'LOG_GROUP_CREATED' => '<strong>New usergroup created</strong><br />» %s', 'LOG_GROUP_DEFAULTS' => '<strong>Group “%1$s” made default for members</strong><br />» %2$s', 'LOG_GROUP_DELETE' => '<strong>Usergroup deleted</strong><br />» %s', |
