diff options
author | Dmitry Stogov <dmitry@zend.com> | 2012-09-06 11:26:40 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2012-09-06 11:26:40 +0400 |
commit | b29dc146b9311c14186c14bcb1c8ae5288b65d73 (patch) | |
tree | 89037500c785747e5a860580a8ccffa3c5e0c84e /Zend/tests/bug60909_2.phpt | |
parent | 94582f93986cfb5a43feb047bc914a0a029286d2 (diff) | |
download | php-git-b29dc146b9311c14186c14bcb1c8ae5288b65d73.tar.gz |
- Fixed bug #61767 (Shutdown functions not called in certain error situation)
- Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function)
Diffstat (limited to 'Zend/tests/bug60909_2.phpt')
-rw-r--r-- | Zend/tests/bug60909_2.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Zend/tests/bug60909_2.phpt b/Zend/tests/bug60909_2.phpt new file mode 100644 index 0000000000..d08d9f90fa --- /dev/null +++ b/Zend/tests/bug60909_2.phpt @@ -0,0 +1,20 @@ +--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!!! |