dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8d6f56
)
Fixed exceptions on attempts to serialize DatabaseSqlite. Encountered today by Nike...
author
Max Semenik
<maxsem@users.mediawiki.org>
Thu, 29 Jul 2010 18:17:11 +0000
(18:17 +0000)
committer
Max Semenik
<maxsem@users.mediawiki.org>
Thu, 29 Jul 2010 18:17:11 +0000
(18:17 +0000)
includes/db/DatabaseSqlite.php
patch
|
blob
|
history
diff --git
a/includes/db/DatabaseSqlite.php
b/includes/db/DatabaseSqlite.php
index
f0de5df
..
ef99dc4
100644
(file)
--- a/
includes/db/DatabaseSqlite.php
+++ b/
includes/db/DatabaseSqlite.php
@@
-34,6
+34,16
@@
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';
}