From: Sam Reed Date: Wed, 18 Aug 2010 13:50:07 +0000 (+0000) Subject: Fix wrong removal in r71250 X-Git-Tag: 1.31.0-rc.0~35452 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=96114da7615eb9e6996a8d9ecff28b703bc538a1;p=lhc%2Fweb%2Fwiklou.git Fix wrong removal in r71250 --- diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index de01b73907..5cb1a33d8d 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -183,7 +183,7 @@ class DatabasePostgres extends DatabaseBase { wfDebug( "DB connection error\n" ); wfDebug( "Server: $server, Database: $dbName, User: $user, Password: " . substr( $password, 0, 3 ) . "...\n" ); wfDebug( $this->lastError()."\n" ); - return false; + throw new DBConnectionError( $this, $phpError ); } $this->mOpened = true; diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index cc586ce8c5..e8d1b5adf1 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -89,7 +89,7 @@ class DatabaseSqlite extends DatabaseBase { } if ( $this->mConn === false ) { wfDebug( "DB connection error: $err\n" ); - return false; + throw new DBConnectionError( $this, $err ); } $this->mOpened = !!$this->mConn; # set error codes only, don't raise exceptions