Bug #79978 [Fbk->NoF]: serialize() on an object returning a string that can't be unserialized()
Edit report at https://bugs.php.net/bug.php?id=79978&edit=1
ID: 79978
Updated by: php-bugs@lists.php.net
Reported by: cdtreeks at gmail dot com
Summary: serialize() on an object returning a string that can't
be unserialized()
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: SPL related
Operating System: Amazon Linux 2
PHP Version: 7.4.9
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2020-08-16 19:21:56] nikic@php.net
It seems likely that you are running into a design flaw with the Serializable interface (especially
if your Serializable implementations involve something like parent::serialize() or
parent::unserialize()). PHP 7.4 introduced new __serialize() and __unserialize() methods to avoid
this problem (described in more detail at https://wiki.php.net/rfc/custom_object_serialization).
Possibly that's something you might want to give a try.
------------------------------------------------------------------------
[2020-08-15 21:03:20] cdtreeks at gmail dot com
Hi Nikita,
Yes, we do make use of the Serializable interface on the object though they really don't do
much at all.
I've done some further testing on 7.2.32 this evening and it seems the same strings are
returned for the serialized objects, however, when we come to unserialize() it's not throwing
the PHP notice (even with E_ALL) so we've not been aware of any issue prior so it could have
been an issue all along.
------------------------------------------------------------------------
[2020-08-15 20:37:47] requinix@php.net
Ah, I do wish Package:SPL bugs would send notification emails to the regular bugs list...
------------------------------------------------------------------------
[2020-08-15 20:36:38] requinix@php.net
Are you using any custom serialization logic? Are the serialized strings from 7.2 and 7.4.9
different?
------------------------------------------------------------------------
[2020-08-15 19:43:23] nikic@php.net
Are any object implementing the Serializable interface involved?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=79978
--
Edit this bug report at https://bugs.php.net/bug.php?id=79978&edit=1
Thread (2 messages)