From: Alexander Ebert Date: Sun, 18 Nov 2012 22:04:06 +0000 (+0100) Subject: Destroying object type processor upon serialization X-Git-Tag: 2.0.0_Beta_1~771 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5d7c02c7c54c20befe99ca9176bf7a437f71d0a;p=GitHub%2FWoltLab%2FWCF.git 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). --- 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() */