com php-src: Add test for bug #75155: NEWS ext/spl/tests/bug75155.phpt

From: Date: Mon, 04 Sep 2017 19:23:07 +0000
Subject: com php-src: Add test for bug #75155: NEWS ext/spl/tests/bug75155.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99253@lists.php.net to get a copy of this message
Commit: c2e3541cc1200f38f72deccac66d889888e3949d Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 4 Sep 2017 21:23:07 +0200 Parents: b689857d53177b6027679f67fecbde8f36c174d1 Branches: PHP-7.1 PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c2e3541cc1200f38f72deccac66d889888e3949d Log: Add test for bug #75155 Bugs: https://bugs.php.net/75155 Changed paths: M NEWS A ext/spl/tests/bug75155.phpt Diff: diff --git a/NEWS b/NEWS index 8103b94..3803c64 100644 --- a/NEWS +++ b/NEWS @@ -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) diff --git a/ext/spl/tests/bug75155.phpt b/ext/spl/tests/bug75155.phpt new file mode 100644 index 0000000..0d0c075 --- /dev/null +++ b/ext/spl/tests/bug75155.phpt @@ -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

« previous php.cvs (#99253) next »