Apr 9 at 11:12am, Jason Giangrande wrote:
You shouldn't serialize() objects prior to assign to a session variable. The default session handler automatically serializes the data. Assigning a
serialized object value to a session just adds redundancy and overhead.
Actually, only if you create the session with session_register() are they serialized automatically. If you simply assign an object to the $_SESSION array it must be serialized manually.
When writing the above response, I had noted the documentation mentioned something to this effect. I believe this is incorrect or ambiguous.
Try it without serializing, it works.
After retesting, it seems you are correct. I guess the same bad __sleep() code that was causing the object not to unserialize at all was also preventing automatic serialization. However; it does not seem to harm anything if serialize() and unserialize() are called manually on an object. It's just extra code that doesn't do anything, and therefore, can be removed.
-- Jason Giangrande <[EMAIL PROTECTED]> http://www.giangrande.org http://www.dogsiview.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php