1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add test for bug #75155

This commit is contained in:
Nikita Popov
2017-09-04 21:23:07 +02:00
parent b689857d53
commit c2e3541cc1
2 changed files with 26 additions and 0 deletions

4
NEWS
View File

@@ -20,6 +20,10 @@ PHP NEWS
. Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized
before PHP-FPM sets it up). (Ingmar Runge)
- SPL:
. Fixed bug #75155 (AppendIterator::append() is broken when appending another
AppendIterator). (Nikita)
- Standard:
. Fixed bug #75097 (gethostname fails if your host name is 64 chars long). (Andrea)

View File

@@ -0,0 +1,22 @@
--TEST--
Bug #75155: AppendIterator::append() is broken when appending another AppendIterator
--FILE--
<?php
$array_a = new ArrayIterator(array('a', 'b', 'c'));
$array_b = new ArrayIterator(array('d', 'e', 'f'));
$iterator = new AppendIterator;
$iterator->append($array_a);
$iterator2 = new AppendIterator;
$iterator2->append($iterator);
$iterator2->append($array_b);
foreach ($iterator2 as $current) {
echo $current;
}
?>
--EXPECT--
abcdef