Fix wrong removal in r71250
authorSam Reed <reedy@users.mediawiki.org>
Wed, 18 Aug 2010 13:50:07 +0000 (13:50 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 18 Aug 2010 13:50:07 +0000 (13:50 +0000)
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php

index de01b73..5cb1a33 100644 (file)
@@ -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;
index cc586ce..e8d1b5a 100644 (file)
@@ -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