From 523f3cce5fc8356ad10035b2e675e077ecca9ec2 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Fri, 31 Mar 2000 15:17:43 +0000 Subject: [PATCH] The previous fix ended up being broken, this one should do it --- Zend/zend_compile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index f09f7293d0..d57cb6275d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1844,9 +1844,9 @@ void do_list_end(znode *result, znode *expr CLS_DC) void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type CLS_DC) { - int opline_num = get_next_op_number(CG(active_op_array)); zend_op *opline = get_next_op(CG(active_op_array) CLS_CC); znode lval; + znode result; if (fetch_type==ZEND_FETCH_STATIC && static_assignment) { zval *tmp; @@ -1869,13 +1869,14 @@ void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment opline->op1 = *varname; SET_UNUSED(opline->op2); opline->op2.u.fetch_type = fetch_type; + result = opline->result; if (varname->op_type == IS_CONST) { zval_copy_ctor(&varname->u.constant); } fetch_simple_variable(&lval, varname, 0 CLS_CC); /* Relies on the fact that the default fetch is BP_VAR_W */ - do_assign_ref(NULL, &lval, &CG(active_op_array)->opcodes[opline_num].result CLS_CC); + do_assign_ref(NULL, &lval, &result CLS_CC); CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result.u.EA.type |= EXT_TYPE_UNUSED; } -- 2.50.1