]> granicus.if.org Git - php/commitdiff
Fixed bug #60138 (GC crash with referenced array in RecursiveArrayIterator)
authorDmitry Stogov <dmitry@php.net>
Fri, 18 Nov 2011 12:43:53 +0000 (12:43 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 18 Nov 2011 12:43:53 +0000 (12:43 +0000)
Zend/tests/bug60138.phpt [new file with mode: 0644]

diff --git a/Zend/tests/bug60138.phpt b/Zend/tests/bug60138.phpt
new file mode 100644 (file)
index 0000000..3bf1fba
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Bug #60138 (GC crash with referenced array in RecursiveArrayIterator)
+--FILE--
+<?php
+$tree = array(array("f"));
+$category =& $tree[0];
+
+$iterator = new RecursiveIteratorIterator(
+    new RecursiveArrayIterator($tree),
+    RecursiveIteratorIterator::SELF_FIRST
+);
+foreach($iterator as $file);
+echo "ok\n";
+?>
+--EXPECT--
+ok