diff options
author | Xinchen Hui <laruence@gmail.com> | 2015-11-21 05:03:20 -0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2015-11-21 05:03:20 -0800 |
commit | c6961cb41bebf1322b75af41f68c26fb875c51d9 (patch) | |
tree | b2ab7b094d131088cb93157adf6f1b1ab3e609d8 | |
parent | 4674f18a4bd7cb6788f16a0e5adb28ae1cd0107c (diff) | |
parent | 205e0ba81d84bf91bdae13039a77db5fa1344dd4 (diff) | |
download | php-git-c6961cb41bebf1322b75af41f68c26fb875c51d9.tar.gz |
Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
Zend/tests/bug70944.phpt
Zend/zend_exceptions.c
-rw-r--r-- | Zend/tests/bug70944.phpt | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/Zend/tests/bug70944.phpt b/Zend/tests/bug70944.phpt index f14af65166..192fd6d501 100644 --- a/Zend/tests/bug70944.phpt +++ b/Zend/tests/bug70944.phpt @@ -2,15 +2,36 @@ Bug #70944 (try{ } finally{} can create infinite chains of exceptions) --FILE-- <?php -$e = new Exception("Bar"); try { - throw new Exception("Foo", 0, $e); -} finally { - throw $e; + $e = new Exception("Foo"); + try { + throw new Exception("Bar", 0, $e); + } finally { + throw $e; + } +} catch (Exception $e) { + var_dump((string)$e); +} + +try { + $e = new Exception("Foo"); + try { + throw new Exception("Bar", 0, $e); + } finally { + throw new Exception("Dummy", 0, $e); + } +} catch (Exception $e) { + var_dump((string)$e); } ?> --EXPECTF-- -Fatal error: Uncaught Exception: Bar in %sbug70944.php:%d +string(%d) "exception 'Exception' with message 'Foo' in %sbug70944.php:%d +Stack trace: +#0 {main}" +string(%d) "exception 'Exception' with message 'Foo' in %sbug70944.php:%d Stack trace: #0 {main} - thrown in %sbug70944.php on line %d + +Next exception 'Exception' with message 'Dummy' in %sbug70944.php:%d +Stack trace: +#0 {main}" |