Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -34,16 +34,6 @@ |
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | | - /** |
39 | | - * Serialization handler, see http://php.net/manual/en/language.oop5.magic.php#language.oop5.magic.sleep |
40 | | - * for details. Instances of this class sometimes get serialized, e.g. with Title and its BacklinkCache |
41 | | - * Because attempts to serialize mConn end in "can't serialize PDO objects" exceptions, we simply disallow |
42 | | - * to serialize anything in this class. |
43 | | - */ |
44 | | - function __sleep() { |
45 | | - return array(); |
46 | | - } |
47 | | - |
48 | 38 | function getType() { |
49 | 39 | return 'sqlite'; |
50 | 40 | } |
Index: trunk/phase3/includes/BacklinkCache.php |
— | — | @@ -22,6 +22,14 @@ |
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
| 26 | + * Serialization handler, diasallows to serialize the database to prevent |
| 27 | + * failures after this class is deserialized from cache with dead DB connection. |
| 28 | + */ |
| 29 | + function __sleep() { |
| 30 | + return array( 'partitionCache', 'fullResultCache', 'title' ); |
| 31 | + } |
| 32 | + |
| 33 | + /** |
26 | 34 | * Clear locally stored data |
27 | 35 | */ |
28 | 36 | function clear() { |