From: Dmitry Stogov Date: Mon, 7 Feb 2005 17:54:58 +0000 (+0000) Subject: Fixed bug introduced with foreach() optimization patch X-Git-Tag: RELEASE_0_2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c91218ae8ac45c29628cb1ea730d7c2c90adf966;p=php Fixed bug introduced with foreach() optimization patch --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 1b9bfe2bee..0d7b6130c4 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3453,7 +3453,7 @@ void zend_do_foreach_cont(znode *value, znode *key, znode *foreach_token TSRMLS_ } if (key->op_type != IS_UNUSED) { - ++opline; + opline = &CG(active_op_array)->opcodes[foreach_token->u.opline_num+1]; opline->result.op_type = IS_TMP_VAR; opline->result.u.EA.type = 0; opline->result.u.opline_num = get_temporary_variable(CG(active_op_array));