Fixes serialization of ObjectType objects
authorMatthias Schmidt <gravatronics@live.com>
Mon, 19 Nov 2012 09:47:26 +0000 (10:47 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 19 Nov 2012 09:47:26 +0000 (10:47 +0100)
wcfsetup/install/files/lib/data/object/type/ObjectType.class.php

index 3434ebea6e453999661c0f8449cb97ea727500a8..bcfd3517adc5be4a0fab0d636f088e5b1cdb41a5 100644 (file)
@@ -42,12 +42,14 @@ class ObjectType extends ProcessibleDatabaseObject {
        }
        
        /**
-        * Destroies processor if attempting to serialize.
+        * Returnes the names of proporties that should be serialized.
+        * 
+        * @return      array<string>
         */
        public final function __sleep() {
-               if ($this->processor !== null) {
-                       $this->processor = null;
-               }
+               // 'processor' isn't returned since it can be an instance of
+               // wcf\system\SingletonFactory which may not be serialized
+               return array('data');
        }
        
        /**