summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-04-08 00:18:29 +0000
committerZeev Suraski <zeev@php.net>1999-04-08 00:18:29 +0000
commit135da4b4fc33188bf576eadb0caecee2bb315895 (patch)
tree9120a3addd28690b30e9f7ae6619cd58b789c87e /Zend/zend_compile.c
parentd0738c2bc35a1c14bd1015a9131056646cfbbbbf (diff)
downloadphp-git-135da4b4fc33188bf576eadb0caecee2bb315895.tar.gz
Fix static assignment
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index f666adeea7..48b7d9aea1 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1431,7 +1431,7 @@ void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment
zend_op *opline = get_next_op(CG(active_op_array) CLS_CC);
znode lval;
- if (fetch_type==ZEND_FETCH_STATIC) {
+ if (fetch_type==ZEND_FETCH_STATIC && static_assignment) {
zval *tmp = (zval *) emalloc(sizeof(zval));
convert_to_string(&varname->u.constant);
@@ -1459,6 +1459,7 @@ void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment
do_assign_ref(NULL, &lval, &opline->result CLS_CC);
+ CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result.u.EA.type |= EXT_TYPE_UNUSED;
}