DatabaseSqlite: better check for error. Noticed by Nikerabbit
authorMax Semenik <maxsem@users.mediawiki.org>
Tue, 28 Sep 2010 13:46:23 +0000 (13:46 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Tue, 28 Sep 2010 13:46:23 +0000 (13:46 +0000)
includes/db/DatabaseSqlite.php

index 95c3db6..66aa744 100644 (file)
@@ -88,7 +88,7 @@ class DatabaseSqlite extends DatabaseBase {
                } catch ( PDOException $e ) {
                        $err = $e->getMessage();
                }
                } catch ( PDOException $e ) {
                        $err = $e->getMessage();
                }
-               if ( $this->mConn === false ) {
+               if ( !$this->mConn ) {
                        wfDebug( "DB connection error: $err\n" );
                        if ( !$this->mFailFunction ) {
                                throw new DBConnectionError( $this, $err );
                        wfDebug( "DB connection error: $err\n" );
                        if ( !$this->mFailFunction ) {
                                throw new DBConnectionError( $this, $err );