Skip to content

Commit 0d524ed

Browse files
committed
Revert "Handle indirect zvals in SplFixedArray::__serialize"
This reverts commit e698938.
1 parent fa1cdfe commit 0d524ed

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

NEWS

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ PHP NEWS
7070
PHP 8.2.4). (nielsdos)
7171
. Fixed bug GH-10844 (ArrayIterator allows modification of readonly props).
7272
(ilutov)
73-
. Fixed bug GH-10925 (Handle indirect zvals in SplFixedArray::__serialize).
74-
(nielsdos)
7573

7674
- Standard:
7775
. Fixed bug GH-10885 (stream_socket_server context leaks). (ilutov)

ext/spl/spl_fixedarray.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ PHP_METHOD(SplFixedArray, __serialize)
610610

611611
/* members */
612612
if (intern->std.properties) {
613-
ZEND_HASH_FOREACH_STR_KEY_VAL_IND(intern->std.properties, key, current) {
613+
ZEND_HASH_FOREACH_STR_KEY_VAL(intern->std.properties, key, current) {
614614
/* The properties hash table can also contain the array elements if the properties table was already rebuilt.
615615
* In this case we'd have a NULL key. We can't simply use the properties table in all cases because it's
616616
* potentially out of sync (missing elements, or containing removed elements) and might need a rebuild. */

ext/spl/tests/gh10907.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ object(SplFixedArray)#1 (3) {
112112
}
113113
=================
114114
Test with adding members
115-
string(180) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";s:15:"my_string_value";s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}"
115+
string(161) "O:15:"MySplFixedArray":5:{i:0;s:12:"test value 1";i:1;s:12:"test value 2";i:2;N;s:9:"my_string";i:0;s:19:"my_dynamic_property";s:25:"my_dynamic_property_value";}"
116116
object(MySplFixedArray)#1 (5) {
117117
["my_string"]=>
118-
string(15) "my_string_value"
118+
int(0)
119119
["my_dynamic_property"]=>
120120
string(25) "my_dynamic_property_value"
121121
[0]=>

0 commit comments

Comments
 (0)