|
|
@@ -686,11 +686,13 @@ class BxDolDb extends BxDolFactory implements iBxDolSingleton
|
|
|
sendMail($this->getParam('site_email'), "Database error in " . $sSiteTitle, $sMailBody, 0, array(), BX_EMAIL_SYSTEM, 'html', true);
|
|
|
}
|
|
|
|
|
|
- bx_log('sys_db', "$sErrorType\n" .
|
|
|
- (empty($aError['message']) ? '' : " Error: {$aError['message']}\n") .
|
|
|
- (empty($aError['query']) ? '' : " Query: {$aError['query']}\n") .
|
|
|
- (!function_exists('getLoggedId') || !getLoggedId() ? '' : " Account ID: " . getLoggedId() . "\n")
|
|
|
- );
|
|
|
+ if (self::$_rLink) { // connection errors aren't logged since bx_log required DB connection
|
|
|
+ bx_log('sys_db', "$sErrorType\n" .
|
|
|
+ (empty($aError['message']) ? '' : " Error: {$aError['message']}\n") .
|
|
|
+ (empty($aError['query']) ? '' : " Query: {$aError['query']}\n") .
|
|
|
+ (!function_exists('getLoggedId') || !getLoggedId() ? '' : " Account ID: " . getLoggedId() . "\n")
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
bx_show_service_unavailable_error_and_exit($sOutput);
|
|
|
}
|