mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed bug #73337 (try/catch not working with two exceptions inside a same operation)
This commit is contained in:
parent
86e603a664
commit
6558559bcc
4
NEWS
4
NEWS
@ -2,6 +2,10 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2016, PHP 5.6.28
|
||||
|
||||
- Core:
|
||||
. Fixed bug #73337 (try/catch not working with two exceptions inside a same
|
||||
operation). (Dmitry)
|
||||
|
||||
-GD:
|
||||
. Fixed bug #73213 (Integer overflow in imageline() with antialiasing). (cmb)
|
||||
. Fixed bug #73272 (imagescale() is not affected by, but affects
|
||||
|
12
Zend/tests/bug73337.phpt
Normal file
12
Zend/tests/bug73337.phpt
Normal file
@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Bug #73337 (try/catch not working with two exceptions inside a same operation)
|
||||
--FILE--
|
||||
<?php
|
||||
class d { function __destruct() { throw new Exception; } }
|
||||
try { new d + new d; } catch (Exception $e) { print "Exception properly caught\n"; }
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Object of class d could not be converted to int in %sbug73337.php on line 3
|
||||
|
||||
Notice: Object of class d could not be converted to int in %sbug73337.php on line 3
|
||||
Exception properly caught
|
@ -826,7 +826,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
||||
if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) {
|
||||
*fci->retval_ptr_ptr = zend_generator_create_zval(EG(active_op_array) TSRMLS_CC);
|
||||
} else {
|
||||
const zend_op *current_opline_before_exception = EG(opline_before_exception);
|
||||
|
||||
zend_execute(EG(active_op_array) TSRMLS_CC);
|
||||
EG(opline_before_exception) = current_opline_before_exception;
|
||||
}
|
||||
|
||||
if (!fci->symbol_table && EG(active_symbol_table)) {
|
||||
|
Loading…
Reference in New Issue
Block a user