Start of bug 24853, killing off 'functional' parts of failfunction code. Seems when...
[lhc/web/wiklou.git] / includes / db / DatabaseSqlite.php
index 3663d31..1313252 100644 (file)
@@ -25,7 +25,6 @@ class DatabaseSqlite extends DatabaseBase {
         */
        function __construct( $server = false, $user = false, $password = false, $dbName = false, $failFunction = false, $flags = 0 ) {
                global $wgSharedDB;
-               $this->mFailFunction = $failFunction;
                $this->mFlags = $flags;
                $this->mName = $dbName;
 
@@ -34,16 +33,6 @@ class DatabaseSqlite extends DatabaseBase {
                }
        }
 
-       /**
-        * Serialization handler, see http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep
-        * for details. Instances of this class sometimes get serialized, e.g. with Title and its BacklinkCache
-        * Because attempts to serialize mConn end in "can't serialize PDO objects" exceptions, we simply disallow
-        * to serialize anything in this class.
-        */
-       function __sleep() {
-               return array();
-       }
-
        function getType() {
                return 'sqlite';
        }
@@ -90,12 +79,7 @@ class DatabaseSqlite extends DatabaseBase {
                }
                if ( !$this->mConn ) {
                        wfDebug( "DB connection error: $err\n" );
-                       if ( !$this->mFailFunction ) {
-                               throw new DBConnectionError( $this, $err );
-                       } else {
-                               return false;
-                       }
-
+                       throw new DBConnectionError( $this, $err );
                }
                $this->mOpened = !!$this->mConn;
                # set error codes only, don't raise exceptions