mirror of
https://github.com/php/php-src.git
synced 2026-04-17 13:01:02 +02:00
This implements a reduced variant of #1226 with just the following change: -Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d +Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d The '' wrapper around messages is very weird if the exception message itself contains ''. Futhermore having the message wrapped in '' doesn't work for the "and defined" suffix of TypeExceptions.
20 lines
562 B
PHP
20 lines
562 B
PHP
--TEST--
|
|
Bug #54281 (Crash in spl_recursive_it_rewind_ex)
|
|
--FILE--
|
|
<?php
|
|
|
|
class RecursiveArrayIteratorIterator extends RecursiveIteratorIterator {
|
|
function __construct($it, $max_depth) { }
|
|
}
|
|
$it = new RecursiveArrayIteratorIterator(new RecursiveArrayIterator(array()), 2);
|
|
|
|
foreach($it as $k=>$v) { }
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught LogicException: The object is in an invalid state as the parent constructor was not called in %s:%d
|
|
Stack trace:
|
|
#0 %s%ebug54281.php(8): RecursiveIteratorIterator->rewind()
|
|
#1 {main}
|
|
thrown in %s%ebug54281.php on line 8
|