diff options
author | Xinchen Hui <laruence@gmail.com> | 2015-11-21 05:03:20 -0800 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-11-21 18:27:43 +0100 |
commit | 7d2a26b3fd90fb8ef8ab5d1a7134c370f3be0a78 (patch) | |
tree | ad84ae82f90a788d8c4d6620aa2a964c87dcb9eb | |
parent | e4d1ac2c0f9dd0ac0789fe6afff0e3f97dae3bc6 (diff) | |
download | php-git-7d2a26b3fd90fb8ef8ab5d1a7134c370f3be0a78.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}" |