Followup r80864: DatabaseSqlite exploded on installer page because it tried to open...
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 24 Jan 2011 17:37:06 +0000 (17:37 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 24 Jan 2011 17:37:06 +0000 (17:37 +0000)
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

index 4da6ecf..7afccaf 100644 (file)
@@ -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 );
+                       }
                }
        }