mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
3ae995f03c
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.
25 lines
757 B
PHP
25 lines
757 B
PHP
--TEST--
|
|
Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
|
|
--FILE--
|
|
<?php
|
|
register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
|
|
set_error_handler(function($errno, $errstr, $errfile, $errline){
|
|
echo "error($errstr)";
|
|
throw new Exception("Foo");
|
|
});
|
|
|
|
require 'notfound.php';
|
|
--EXPECTF--
|
|
error(require(notfound.php): failed to open stream: %s)
|
|
Warning: Uncaught Exception: Foo in %sbug60909_1.php:5
|
|
Stack trace:
|
|
#0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8, Array)
|
|
#1 %sbug60909_1.php(8): require()
|
|
#2 {main}
|
|
thrown in %sbug60909_1.php on line 5
|
|
|
|
Fatal error: main(): Failed opening required 'notfound.php' (include_path='%s') in %sbug60909_1.php on line 8
|
|
|
|
|
|
!!!shutdown!!!
|