Uh oh!
There was an error while loading. Please reload this page.
Skip non-existing properties returned by __sleep() - #5413
Conversation
TysonAndre
commented
Apr 19, 2020
This seems like an improvement, and would be consistent with the other PR being worked on to omit uninitialized&unset declared typed properties from If there was a need in an application to serialize a literal null, then It should be noted in UPGRADING afterwards if this gets merged, though. Would like to hear what @nikic and others think |
nikic
commented
Apr 19, 2020
I agree that this change makes sense. I think it would be safer to land it in master only though, assuming there is no particular urgency to make the change. |
nicolas-grekas
commented
Apr 19, 2020
Works for me, now rebased on |
cmb69
commented
Apr 22, 2020
Thanks! Applied as 657f756. |
Serializing a
nullfor properties that don't exist makes no sense.Better skip them.
I think this old behavior was due to a pure side effect of the implementation, which has been fixed in 90fea67 and can now be fixed.