]> granicus.if.org Git - php/commitdiff
Fixed bug introduced with foreach() optimization patch
authorDmitry Stogov <dmitry@php.net>
Mon, 7 Feb 2005 17:54:58 +0000 (17:54 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 7 Feb 2005 17:54:58 +0000 (17:54 +0000)
Zend/zend_compile.c

index 1b9bfe2bee2af80411953f2cd0c6285635252818..0d7b6130c4c1243d222ce8bb8a500dd8c4d35734 100644 (file)
@@ -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));