Req #75268 [Asn->Opn]: SplFixedArray doesn't implement __set_state().
Edit report at https://bugs.php.net/bug.php?id=75268&edit=1
ID: 75268
Updated by: levim@php.net
Reported by: brad at hallnet dot co dot uk
Summary: SplFixedArray doesn't implement __set_state().
-Status: Assigned
+Status: Open
Type: Feature/Change Request
Package: SPL related
Operating System: Ubuntu
PHP Version: 7.0.23
-Assigned To: levim
+Assigned To:
Block user comment: N
Private report: N
New Comment:
I wasn't able to complete it in the time I allotted. I hope dynamic properties will probably be
forbidden on this class at some point in the future, which will help alleviate if not totally fix
the issue.
Previous Comments:
------------------------------------------------------------------------
[2020-10-02 03:03:49] levim@php.net
The following pull request has been associated:
Patch Name: Add SplFixedArray::__set_state
On GitHub: https://github.com/php/php-src/pull/6261
Patch: https://github.com/php/php-src/pull/6261.patch
------------------------------------------------------------------------
[2020-10-01 16:49:26] levim@php.net
Here's an example that shows existing serialization/unserialization is not quite correct:
https://3v4l.org/IMnI5.
My plan to fix this is to have string keys become properties and for numeric keys to become array
values. This same design should work for __set_state.
------------------------------------------------------------------------
[2020-10-01 04:54:59] levim@php.net
I'm trying to implement this for Hacktoberfest.
------------------------------------------------------------------------
[2018-02-13 21:07:19] nikic@php.net
@carusogabriel34: The code generation works, but running the code doesn't, as SplFixedArray
does not implement __set_state(): https://3v4l.org/50QD3
------------------------------------------------------------------------
[2018-02-13 20:43:49] carusogabriel34 at gmail dot com
Couldn't reproduce https://3v4l.org/QrqN0
------------------------------------------------------------------------
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=75268
--
Edit this bug report at https://bugs.php.net/bug.php?id=75268&edit=1
Thread (9 messages)