2015-11-20 16:24:53 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #70944 (try{ } finally{} can create infinite chains of exceptions)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
try {
|
2015-11-21 16:27:56 +08:00
|
|
|
$e = new Exception("Foo");
|
|
|
|
try {
|
|
|
|
throw new Exception("Bar", 0, $e);
|
|
|
|
} finally {
|
|
|
|
throw $e;
|
|
|
|
}
|
|
|
|
} catch (Exception $e) {
|
|
|
|
var_dump($e->getMessage());
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
$e = new Exception("Foo");
|
|
|
|
try {
|
|
|
|
throw new Exception("Bar", 0, $e);
|
|
|
|
} finally {
|
|
|
|
throw new Exception("Dummy", 0, $e);
|
|
|
|
}
|
|
|
|
} catch (Exception $e) {
|
|
|
|
var_dump($e->getMessage());
|
2015-11-20 16:24:53 +08:00
|
|
|
}
|
|
|
|
?>
|
2015-11-21 16:27:56 +08:00
|
|
|
--EXPECT--
|
|
|
|
string(3) "Foo"
|
|
|
|
string(5) "Dummy"
|