1--TEST-- 2SPL: RecursiveTreeIterator and Exception from getEntry() 3--INI-- 4error_reporting=E_ALL&~E_NOTICE 5--FILE-- 6<?php 7 8$ary = array(new stdClass); 9 10class RecursiveArrayIteratorAggregated implements IteratorAggregate { 11 public $it; 12 function __construct($it) { 13 $this->it = new RecursiveArrayIterator($it); 14 } 15 function getIterator() { 16 return $this->it; 17 } 18} 19 20$it = new RecursiveArrayIteratorAggregated($ary); 21try { 22 foreach(new RecursiveTreeIterator($it) as $k => $v) { 23 echo "[$k] => $v\n"; 24 } 25} catch (UnexpectedValueException $e) { 26 echo "UnexpectedValueException thrown\n"; 27} 28 29?> 30===DONE=== 31--EXPECTF-- 32UnexpectedValueException thrown 33===DONE=== 34