From e01171ca85e09b10a93337c9a88022545dee23c1 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 22 Feb 2010 00:57:01 +0000 Subject: [PATCH] General errors can't be logged if there isn't a database connection, introduced in r9924 #57975 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10518 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/functions.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index cfd8a2fafd..7a67093c5e 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -175,6 +175,7 @@
  • [Fix] Correct behavior of "force_approved_state" when value is false. (Bug #57715)
  • [Fix] Global announcements could not be accessed on a board using Firebird as the database server. (Bug #57525)
  • [Fix] BBCode parser now uses the user object for all settings rather than taking some from the template object (Bug #57365)
  • +
  • [Fix] Ensure a database connection is available before logging general errors. (Bug #57975)
  • [Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)
  • [Change] Log activation through inactive users ACP. (Bug #30145)
  • [Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)
  • diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 913b1c0fa0..364c8f4e9e 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3531,7 +3531,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) } } - if (defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) + if ((defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db)) { // let's avoid loops $db->sql_return_on_error(true);