Skip to content

Conversation

jrbasso
Copy link
Contributor

@jrbasso jrbasso commented Feb 6, 2015

Returning just N; (null) on the __sleep makes the number of fields/values be incomplete and corrupting the generated value from serialize, making impossible to unserialize it.

This was discussed on this thread: https://www.mail-archive.com/internals@lists.php.net/msg74014.html

@smalyshev smalyshev added the Bug label Feb 6, 2015
@smalyshev
Copy link
Contributor

What if sleep() returns non-array?

@jrbasso
Copy link
Contributor Author

jrbasso commented Feb 6, 2015

@smalyshev This is handled in a different part of the code (here). In resume, if the response from __sleep is non-array the serialize transforms the object in null.

Returning just N; (null) on the __sleep makes the number of fields/values be incomplete and corrupting the generated value from serialize, making impossible to unserialize it.
@jrbasso jrbasso force-pushed the serialize-integrity branch from 77572da to cbdeccd Compare March 9, 2015 13:05
@php-pulls php-pulls merged commit 6b7b5e7 into php:master Mar 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants