Fixed 'additionalData' access
authorAlexander Ebert <ebert@woltlab.com>
Tue, 12 Jun 2012 16:41:42 +0000 (18:41 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 12 Jun 2012 16:41:42 +0000 (18:41 +0200)
wcfsetup/install/files/lib/data/modification/log/ModificationLog.class.php
wcfsetup/install/files/lib/data/object/type/ObjectType.class.php

index d2369ad121d5ebbad06633771fb20ba578d5d82e..e96396717eb6a8f4a84d559cbbcde9f3a0cfc691 100644 (file)
@@ -38,4 +38,16 @@ class ModificationLog extends DatabaseObject {
        
                return $value;
        }
+       
+       /**
+        * @see wcf\data\DatabaseObject::handleData()
+        */
+       protected function handleData($data) {
+               parent::handleData($data);
+       
+               $this->data['additionalData'] = @unserialize($this->data['additionalData']);
+               if (!is_array($this->data['additionalData'])) {
+                       $this->data['additionalData'] = array();
+               }
+       }
 }
index 61cbb78969fc3e1b1b355c8fa18b850ac9d0ecf6..0c2bd3ea58f0e0eb737d69111c260b493b7ea2e7 100644 (file)
@@ -41,6 +41,18 @@ class ObjectType extends ProcessibleDatabaseObject {
                return $value;
        }
        
+       /**
+        * @see wcf\data\DatabaseObject::handleData()
+        */
+       protected function handleData($data) {
+               parent::handleData($data);
+               
+               $this->data['additionalData'] = @unserialize($this->data['additionalData']);
+               if (!is_array($this->data['additionalData'])) {
+                       $this->data['additionalData'] = array();
+               }
+       }
+       
        /**
         * @see wcf\data\ProcessibleDatabaseObject::getProcessor()
         */