$this->title = $title;
}
+ /**
+ * Serialization handler, diasallows to serialize the database to prevent
+ * failures after this class is deserialized from cache with dead DB connection.
+ */
+ function __sleep() {
+ return array( 'partitionCache', 'fullResultCache', 'title' );
+ }
+
/**
* Clear locally stored data
*/
}
}
- /**
- * 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';
}