Bug #77302 [Asn->Csd]: Unserialize decode issue
| From: | nikic@php.net | Date: | Wed, 24 Jun 2020 12:15:18 +0000 |
| Subject: | Bug #77302 [Asn->Csd]: Unserialize decode issue | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-227627@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77302&edit=1
ID: 77302
Updated by: nikic@php.net
Reported by: sh at analogic dot cz
Summary: Unserialize decode issue
-Status: Assigned
+Status: Closed
Type: Bug
Package: Variables related
PHP Version: 7.3.0
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Closing this. PHP 7.4 implements https://wiki.php.net/rfc/custom_object_serialization
as a robust custom serialization mechanism where usage of parent::__serialize /
parent::__unserialize is safe. There is nothing actionable here beyond that.
Previous Comments:
------------------------------------------------------------------------
[2019-06-27 15:06:24] aco at itn dot me
So, I am on PHP Version 7.2.19-0ubuntu0.18.04.1
But I have same problem, can I get the function directly, or I need to update to which PHP version ?
------------------------------------------------------------------------
[2019-02-26 18:06:04] felix at moches dot de
Oh, and concerning your question: The docs at http://php.net/manual/en/serializable.serialize.php
say:
"Return Values: Returns the string representation of the object or NULL"
Although the return type declaration explicitly states "string" and not
"?string".
But this is probably not PHP7.1+ syntax anyways.
------------------------------------------------------------------------
[2019-02-26 18:00:39] felix at moches dot de
Thank you very much.
------------------------------------------------------------------------
[2019-02-21 11:08:52] nikic@php.net
@felix: I've fixed this issue in https://github.com/php/php-src/commit/af324e24df85022314787f6dcf2ac811f58b88f3.
------------------------------------------------------------------------
[2019-02-21 10:50:09] nikic@php.net
@felix: That's not quite the same bug, and something we can actually fix...
I wasn't aware that returning null from Serializable::serialize() is a thing. This was allowed
in https://github.com/php/php-src/commit/d77945ef78aead05a3adb6307ccedc12d0ca49ee,
but I'm wondering why... Do you happen to know?
------------------------------------------------------------------------
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=77302
--
Edit this bug report at https://bugs.php.net/bug.php?id=77302&edit=1