Changeset 509

Show
Ignore:
Timestamp:
04/14/07 11:47:38 (2 years ago)
Author:
mikey
Message:

bugfix: do not reserialize if it was not unserialized before

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/stubSerializedObject.php

    r498 r509  
    7373    public function __sleep() 
    7474    { 
    75         $this->data = serialize($this->classInstance); 
     75        if (null == $this->data && null != $this->classInstance) { 
     76            $this->data = serialize($this->classInstance); 
     77        } 
     78         
    7679        return array('fqClassName', 'nqClassName', 'hashCode', 'data'); 
    7780    } 
    78      
     81 
    7982    /** 
    8083     * returns an unserialized version of the class