summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorbwoebi <bobwei9@hotmail.com>2013-10-16 16:04:23 +0200
committerNikita Popov <nikic@php.net>2013-10-16 18:33:14 +0200
commit4c0bb6d76eb0c8b9fdc74c3c8858a146ab34e2f8 (patch)
tree92449281c67cd0d1bc894d4bc37ef4c9b78989e5 /Zend/zend_compile.c
parentb0a36007abb522b6b1e3a6b3108eb726053b9d72 (diff)
downloadphp-git-4c0bb6d76eb0c8b9fdc74c3c8858a146ab34e2f8.tar.gz
Fixed bug #65911 ($this not usable as static property)
In context of static accesses like classname::$this, the string "$this" should not be handled like a $this variable, but as an identifier for a static variable.
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 326d4ef976..10390b04a8 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -905,6 +905,7 @@ static zend_bool opline_is_fetch_this(const zend_op *opline TSRMLS_DC) /* {{{ */
{
if ((opline->opcode == ZEND_FETCH_W) && (opline->op1_type == IS_CONST)
&& (Z_TYPE(CONSTANT(opline->op1.constant)) == IS_STRING)
+ && ((opline->extended_value & ZEND_FETCH_STATIC_MEMBER) != ZEND_FETCH_STATIC_MEMBER)
&& (Z_HASH_P(&CONSTANT(opline->op1.constant)) == THIS_HASHVAL)
&& (Z_STRLEN(CONSTANT(opline->op1.constant)) == (sizeof("this")-1))
&& !memcmp(Z_STRVAL(CONSTANT(opline->op1.constant)), "this", sizeof("this"))) {