diff options
author | Craig Andrews <candrews@integralblue.com> | 2010-03-01 21:53:10 -0500 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2010-03-01 21:53:54 -0500 |
commit | 68347691b0c7fb3f81415abd7fcdc5aec85cc554 (patch) | |
tree | 69a71220f54e72b0a1a21be9dba1dbad6a47973e /index.php | |
parent | a0114f20066fb50b5f8074bb00db0b398ff7899a (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.php | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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, '. |