Hi!

>> I can try to make a patch to solve it, but before that I would like how
>> the behavior should be. Some options:
>> 1) Give the notice saying the field doesn't exist and do not include on
>> the serialized response
>> 2) Give the notice saying the field doesn't exist and convert the value to
>> string (ie, on my example the int(1) would be transformed to string(1))

I'd try (2) if it doesn't work (which probably would be the case unless
your object happens to have property named "42" somehow) then produce a
notice and omit it. If __sleep returns wrong value completely - e.g.
false, I'd produce a warning and serialize it as null.
-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to