forked from GNUsocial/gnu-social
Don't attempt to retrieve the current user from the DB while processing a DB error
This commit is contained in:
parent
9398c61ed3
commit
d7d3a50d87
@ -92,6 +92,12 @@ function handleError($error)
|
|||||||
|| $error instanceof DB_Error
|
|| $error instanceof DB_Error
|
||||||
|| ($error instanceof PEAR_Exception && $error->getCode() == -24)
|
|| ($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(
|
$msg = sprintf(
|
||||||
_(
|
_(
|
||||||
'The database for %s isn\'t responding correctly, '.
|
'The database for %s isn\'t responding correctly, '.
|
||||||
|
Loading…
Reference in New Issue
Block a user