From f5d7c02c7c54c20befe99ca9176bf7a437f71d0a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 18 Nov 2012 23:04:06 +0100 Subject: [PATCH] Destroying object type processor upon serialization SingletonFactory does not allow serialization, therefore we need to remove it (as an object type can be serialized by design). --- .../files/lib/data/object/type/ObjectType.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php b/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php index 3727de9a17..3434ebea6e 100644 --- a/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php +++ b/wcfsetup/install/files/lib/data/object/type/ObjectType.class.php @@ -41,6 +41,15 @@ class ObjectType extends ProcessibleDatabaseObject { return $value; } + /** + * Destroies processor if attempting to serialize. + */ + public final function __sleep() { + if ($this->processor !== null) { + $this->processor = null; + } + } + /** * @see wcf\data\DatabaseObject::handleData() */ -- 2.20.1