Apr 10 at 1:39pm, Tom Rogers wrote:
> Is your __sleep() function returning the array required by serialization?

Since you mentioned it, I tried returning an array and it did not
segfault, thought it was initially unclear what the array was for.

After reading over most of the documentation about serializing objects for
the Nth time, I finally found this sentence, which I didn't recall:

"It can clean up the object and is supposed to return an array with the 
names of all variables of that object that should be serialized."

I guess that's pretty clear, but it's not the first time I missed a
half-sentence in the manual that provided a very key bit of information.  
It doesn't help that this is the only mention within serveral full pages
related to the topic of serializing objects.

I think "must" seems more apropos than "supposed to" considering the
result/consequence... It's probably just my older version of PHP, but a
segfault seems like a pretty extreme error message :)

Thanks for pointing me in the right direction! It's so much easier to find
the explanation when you already have the answer....

--Kelly

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to