1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Files
archived-php-src/ext/spl/tests/bug81587.phpt
T
Nikita Popov 4b9fbc6627 Fixed bug #81587
iterator_funcs_ptr may be null for Iterators with custom
get_iterator. Ideally MultipleIterator would make use of get_iterator,
but this would require a large implementation change.
2021-11-04 10:34:52 +01:00

19 lines
393 B
PHP

--TEST--
Bug #81587: MultipleIterator Segmentation fault w/ SimpleXMLElement attached
--SKIPIF--
<?php if (!extension_loaded('simplexml')) die('skip requires simplexml'); ?>
--FILE--
<?php
$mi = new MultipleIterator();
$mi->attachIterator(new SimpleXMLElement('<x><y/></x>'));
foreach ($mi as $v) {
var_dump($v);
}
?>
--EXPECT--
array(1) {
[0]=>
object(SimpleXMLElement)#4 (0) {
}
}