Re: serializing anonymous objects

From: Date: Sun, 02 Jul 2000 20:34:12 +0000
Subject: Re: serializing anonymous objects
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-23247@lists.php.net to get a copy of this message
On Sun, 2 Jul 2000, Chuck Hagenbuch wrote: > The recent changes to the serializer/deserializer code have bitten me again. > Here's the scenario: > > 1. imap_rfc822_parse_adrlist() returns an array of objects. > 2. I'd like to pass one or more of those to another script, and not have to > fetch them from the imap server or call the function again. > 3. So I serialize them. > 4. However, because of the new behavior, these are deserialized as stdClass, > and php errors out if I try to access any of the data in the object. That should not happen. Which version of PHP are you using? The current deserializers do not use stdClass anymore for incomplete objects. If your "anonymous" objects are of class stdClass, you can access the properties. This has been fixed in 4.0.1pl2. - Sascha

« previous php.dev (#23247) next »