1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/spl/tests/bug78409.phpt
Nikita Popov 34885408db Fixed bug #78409
This removes an incorrect optimization (I think this code used to be
necessary to properly handle references in the Serializable based
implementation, but now this code just avoids an array duplication
in a way that is not sound).
2019-08-15 10:40:28 +02:00

27 lines
293 B
PHP

--TEST--
Bug #78409: Segfault when creating instance of ArrayIterator without constructor
--FILE--
<?php
$a = new ArrayObject;
$u = [
0,
[],
[],
];
$a->__unserialize($u);
var_dump($u);
?>
--EXPECT--
array(3) {
[0]=>
int(0)
[1]=>
array(0) {
}
[2]=>
array(0) {
}
}