summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_execute.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r--Zend/zend_vm_execute.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 5210484370..c80229f738 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -1029,10 +1029,6 @@ static int ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_AR
SAVE_OPLINE();
ZVAL_LONG(EX_VAR(opline->result.var), EG(error_reporting));
- if (EX(silence_op_num) == -1) {
- EX(silence_op_num) = opline->op2.num;
- EX(old_error_reporting) = EG(error_reporting);
- }
if (EG(error_reporting)) {
do {
@@ -1264,17 +1260,16 @@ static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER
if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
}
+ } else if (brk_opline->opcode == ZEND_END_SILENCE) {
+ /* restore previous error_reporting value */
+ if (!EG(error_reporting) && Z_LVAL_P(EX_VAR(brk_opline->op1.var)) != 0) {
+ EG(error_reporting) = Z_LVAL_P(EX_VAR(brk_opline->op1.var));
+ }
}
}
}
}
- /* restore previous error_reporting value */
- if (!EG(error_reporting) && EX(silence_op_num) != -1 && EX(old_error_reporting) != 0) {
- EG(error_reporting) = EX(old_error_reporting);
- }
- EX(silence_op_num) = -1;
-
if (finally_op_num && (!catch_op_num || catch_op_num >= finally_op_num)) {
if (EX(delayed_exception)) {
zend_exception_set_previous(EG(exception), EX(delayed_exception) TSRMLS_CC);
@@ -10251,9 +10246,6 @@ static int ZEND_FASTCALL ZEND_END_SILENCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_
if (!EG(error_reporting) && Z_LVAL_P(EX_VAR(opline->op1.var)) != 0) {
EG(error_reporting) = Z_LVAL_P(EX_VAR(opline->op1.var));
}
- if (EX(silence_op_num) == opline->op2.num) {
- EX(silence_op_num) = -1;
- }
ZEND_VM_NEXT_OPCODE();
}