mirror of
https://github.com/php/php-src.git
synced 2024-09-30 22:36:12 +00:00
b29dc146b9
- Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function)
21 lines
551 B
PHP
21 lines
551 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){throw new Exception("Foo");});
|
|
|
|
class Bad {
|
|
public function __toString() {
|
|
throw new Exception('Oops, I cannot do this');
|
|
}
|
|
}
|
|
|
|
$bad = new Bad();
|
|
echo "$bad";
|
|
--EXPECTF--
|
|
Fatal error: Method Bad::__toString() must not throw an exception in %sbug60909_2.php on line 0
|
|
|
|
|
|
!!!shutdown!!!
|