Re: [PHP-DEV] serializing anonymous objects From: Sascha Schumann (sascha <email protected>)
Date: 07/02/00

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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>