Sqlite fails to open a connection when $user is given.
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 1 Aug 2011 22:57:34 +0000 (22:57 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 1 Aug 2011 22:57:34 +0000 (22:57 +0000)
Reported by lokkju in #wikimedia-tech

includes/db/DatabaseSqlite.php

index 92525d7..e5fca4c 100644 (file)
@@ -37,7 +37,7 @@ class DatabaseSqlite extends DatabaseBase {
                $this->mName = $dbName;
                parent::__construct( $server, $user, $password, $dbName, $flags );
                // parent doesn't open when $user is false, but we can work with $dbName
-               if( !$user && $dbName ) {
+               if( $dbName ) {
                        global $wgSharedDB;
                        if( $this->open( $server, $user, $password, $dbName ) && $wgSharedDB ) {
                                $this->attachDatabase( $wgSharedDB );