summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-03-01 21:53:10 -0500
committerCraig Andrews <candrews@integralblue.com>2010-04-18 19:28:49 -0400
commitd7d3a50d8751f071aa95541813af1d190e71430e (patch)
tree2933851131c859f8868aa4ad7039299089d1d2ce /index.php
parent9398c61ed321472ab7131c063ed319a51d2b2bef (diff)
Don't attempt to retrieve the current user from the DB while processing a DB error
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/index.php b/index.php
index 78c4de62a..66a9838d6 100644
--- a/index.php
+++ b/index.php
@@ -92,6 +92,12 @@ function handleError($error)
|| $error instanceof DB_Error
|| ($error instanceof PEAR_Exception && $error->getCode() == -24)
) {
+ //If we run into a DB error, assume we can't connect to the DB at all
+ //so set the current user to null, so we don't try to access the DB
+ //while rendering the error page.
+ global $_cur;
+ $_cur = null;
+
$msg = sprintf(
_(
'The database for %s isn\'t responding correctly, '.