summaryrefslogtreecommitdiff
path: root/program/include/main.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-03-14 21:13:07 +0000
committerthomascube <thomas@roundcube.net>2006-03-14 21:13:07 +0000
commit8affba5be0de8ec5b7bf71e12171ccb53ead497b (patch)
tree44554a9b9db111b8ab163d55ea2e5ad06fcf350a /program/include/main.inc
parenta2f2c5e1b7c8ed6d398eb6fd751f94553fa7d38e (diff)
Improved error handling in DB connection failure
Diffstat (limited to 'program/include/main.inc')
-rw-r--r--program/include/main.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 515de03b9..e6a26b773 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -74,10 +74,12 @@ function rcmail_startup($task='mail')
$DB = new rcube_db($CONFIG['db_dsnw'], $CONFIG['db_dsnr']);
$DB->sqlite_initials = $INSTALL_PATH.'SQL/sqlite.initial.sql';
+ $DB->db_connect('w');
+
// we can use the database for storing session data
// session queries do not work with MDB2
- if ($CONFIG['db_backend']!='mdb2' && is_object($DB))
+ if ($CONFIG['db_backend']!='mdb2' && !$DB->is_error())
include_once('include/session.inc');