blob: 347eb555715872af1ad0bb7e5562f8b9024bebdc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--TEST--
Bug #26229 (getIterator() segfaults when it returns arrays or scalars)
--FILE--
<?php
class array_iterator implements IteratorAggregate {
public function getIterator() {
return array('foo', 'bar');
}
}
$obj = new array_iterator;
try
{
foreach ($obj as $property => $value)
{
var_dump($value);
}
}
catch(Exception $e)
{
echo $e->getMessage() . "\n";
}
?>
===DONE===
--EXPECTF--
Objects returned by array_iterator::getIterator() must be traversable or implement interface Iterator
===DONE===
|