diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index 4c3efe22ef..4048a3f0eb 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -452,7 +452,12 @@ class egw_db $this->Link_ID =& $GLOBALS['egw']->ADOdb; } } - if (!$this->Link_ID->isConnected()) $this->Link_ID->Connect(); + if (!$this->Link_ID->isConnected() && !$this->Link_ID->Connect()) + { + $Host = preg_replace('/password=[^ ]+/','password=$Password',$this->Host); // eg. postgres dsn contains password + $this->halt("ADOdb::$connect($Host, $this->User, \$Password, $this->Database) reconnect failed."); + return null; // in case error-reporting = 'no' + } if ($new_connection) {