From 6dc04d98f21ead4ec16b26b463293421ba932974 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sat, 12 Mar 2005 22:42:37 +0000 Subject: [PATCH] - If an exception is pending we don't bail out but show the unhandled exception --- Zend/zend_vm_def.h | 3 +++ Zend/zend_vm_execute.h | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 0823420e3a6..b84949e0496 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3254,6 +3254,9 @@ ZEND_VM_HANDLER(79, ZEND_EXIT, CONST|TMP|VAR|UNUSED|CV, ANY) { zend_op *opline = EX(opline); + if (EG(exception)) { + ZEND_VM_RETURN(); + } if (OP1_TYPE != IS_UNUSED) { zval *ptr; zend_free_op free_op1; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 89ca48fb57b..dda89e9a4a1 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2081,6 +2081,9 @@ static int ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); + if (EG(exception)) { + ZEND_VM_RETURN(); + } if (IS_CONST != IS_UNUSED) { zval *ptr; zend_free_op free_op1; @@ -4540,6 +4543,9 @@ static int ZEND_EXIT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); + if (EG(exception)) { + ZEND_VM_RETURN(); + } if (IS_TMP_VAR != IS_UNUSED) { zval *ptr; zend_free_op free_op1; @@ -7752,6 +7758,9 @@ static int ZEND_EXIT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); + if (EG(exception)) { + ZEND_VM_RETURN(); + } if (IS_VAR != IS_UNUSED) { zval *ptr; zend_free_op free_op1; @@ -13291,6 +13300,9 @@ static int ZEND_EXIT_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); + if (EG(exception)) { + ZEND_VM_RETURN(); + } if (IS_UNUSED != IS_UNUSED) { zval *ptr; zend_free_op free_op1; @@ -18404,6 +18416,9 @@ static int ZEND_EXIT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); + if (EG(exception)) { + ZEND_VM_RETURN(); + } if (IS_CV != IS_UNUSED) { zval *ptr; zend_free_op free_op1; @@ -30960,6 +30975,9 @@ static int ZEND_EXIT_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); + if (EG(exception)) { + ZEND_VM_RETURN(); + } if (opline->op1.op_type != IS_UNUSED) { zval *ptr; zend_free_op free_op1;