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 (Error $e) {
26    echo $e->getMessage(), "\n";
27}
28
29?>
30--EXPECT--
31Object of class stdClass could not be converted to string
32