mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fixed bug #73337 (try/catch not working with two exceptions inside a same operation) Revert "Fix bug #47890 #73215 uniqid() should use better random source" Update NEWS
This commit is contained in:
commit
c31d66b3fd
3
NEWS
3
NEWS
@ -15,6 +15,9 @@ PHP NEWS
|
||||
(Laruence)
|
||||
. Fixed for #73240 (Write out of bounds at number_format). (Stas)
|
||||
. Fix pthreads detection when cross-compiling (ffontaine)
|
||||
. Fixed bug #73215 (uniqid() should use better random source). (Yasuo)
|
||||
. Fixed bug #73337 (try/catch not working with two exceptions inside a same
|
||||
operation). (Dmitry)
|
||||
|
||||
- BCmath:
|
||||
. Fix bug #73190 (memcpy negative parameter _bc_new_num_ex). (Stas)
|
||||
|
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
|
@ -822,8 +822,11 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
|
||||
|
||||
if (func->type == ZEND_USER_FUNCTION) {
|
||||
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
|
||||
const zend_op *current_opline_before_exception = EG(opline_before_exception);
|
||||
|
||||
zend_init_execute_data(call, &func->op_array, fci->retval);
|
||||
zend_execute_ex(call);
|
||||
EG(opline_before_exception) = current_opline_before_exception;
|
||||
if (call_via_handler) {
|
||||
/* We must re-initialize function again */
|
||||
fci_cache->initialized = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user