From 537bf1ef01a029565be15f261bc3527dee870346 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 24 Jan 2011 17:37:06 +0000 Subject: [PATCH] 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. --- includes/db/DatabaseSqlite.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 ); + } } } -- 2.20.1