mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
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).
27 lines
293 B
PHP
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) {
|
|
}
|
|
}
|