summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 5d16f370c1..d1e4a92088 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -937,12 +937,17 @@ void do_brk_cont(int op, znode *expr CLS_DC)
void do_switch_cond(znode *cond CLS_DC)
{
zend_switch_entry switch_entry;
+ zend_op *opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1];
switch_entry.cond = *cond;
switch_entry.default_case = -1;
switch_entry.control_var = -1;
zend_stack_push(&CG(switch_cond_stack), (void *) &switch_entry, sizeof(switch_entry));
+ if (opline->result.op_type == IS_VAR) {
+ opline->result.u.EA.type |= EXT_TYPE_UNUSED;
+ }
+
do_begin_loop(CLS_C);
INC_BPC(CG(active_op_array));