From: Chad Horohoe Date: Mon, 24 Jan 2011 17:37:06 +0000 (+0000) Subject: Followup r80864: DatabaseSqlite exploded on installer page because it tried to open... X-Git-Tag: 1.31.0-rc.0~32393 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=537bf1ef01a029565be15f261bc3527dee870346;p=lhc%2Fweb%2Fwiklou.git Followup r80864: DatabaseSqlite exploded on installer page because it tried to open an invalid $wgSqliteDataDir. Even though it doesn't use $server, only call open() if it's set, like in the other constructors. The amount of code duplication here is stupid. --- diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 4da6ecf5b1..7afccaf3be 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -28,8 +28,10 @@ class DatabaseSqlite extends DatabaseBase { $this->mFlags = $flags; $this->mName = $dbName; - if ( $this->open( $server, $user, $password, $dbName ) && $wgSharedDB ) { - $this->attachDatabase( $wgSharedDB ); + if( $server ) { + if ( $this->open( $server, $user, $password, $dbName ) && $wgSharedDB ) { + $this->attachDatabase( $wgSharedDB ); + } } }