We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a04d181 commit c77bbcdCopy full SHA for c77bbcd
ext/spl/spl_fixedarray.c
@@ -223,6 +223,10 @@ static HashTable* spl_fixedarray_object_get_properties(zend_object *obj)
223
zend_hash_index_del(ht, i);
224
}
225
226
+ if (HT_IS_PACKED(ht)) {
227
+ /* Engine doesn't expet packed array */
228
+ zend_hash_packed_to_hash(ht);
229
+ }
230
231
232
return ht;
ext/spl/tests/fixedarray_023.phpt
@@ -0,0 +1,11 @@
1
+--TEST--
2
+SPL: FixedArray: Bug GH-8041 (php 8.2.0-dev crashes with assertion for cloning/get_object_vars on non-empty SplFixedArray)
3
+--FILE--
4
+<?php
5
+$x = new SplFixedArray(1);
6
+$z = (array)$x;
7
+$y = clone $x;
8
+?>
9
+DONE
10
+--EXPECT--
11
0 commit comments