summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-01 14:35:34 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-01 14:35:34 +0400
commit015e5dc43b1ad098289bce59947ee84da8f04367 (patch)
tree594932379c44e719b3a6297f33b7a3caae79e07a
parent70b7950a75609c4386f996fe7cb1a005447262b4 (diff)
downloadphp-git-015e5dc43b1ad098289bce59947ee84da8f04367.tar.gz
In case the string can't be interned it must not be released
-rw-r--r--Zend/zend_compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 8dcaf29cdc..1d461ddaa7 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -6239,7 +6239,9 @@ void zend_do_indirect_references(znode *result, const znode *num_references, zno
if (CG(active_op_array)->scope && CG(active_op_array)->this_var == -1) {
zend_string *key = STR_INIT("this", sizeof("this")-1, 0);
CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), key TSRMLS_CC);
- STR_RELEASE(key);
+ if (CG(active_op_array)->vars[EX_VAR_TO_NUM(CG(active_op_array)->this_var)] != key) {
+ STR_RELEASE(key);
+ }
}
}
/* }}} */