From: Zeev Suraski Date: Wed, 4 Feb 2004 17:57:48 +0000 (+0000) Subject: Fix handling of $this in some cases X-Git-Tag: php-5.0.0b4RC1~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bab3acc37bbd107f9ace897665b4cf1310d05648;p=php Fix handling of $this in some cases --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 368e88db4c..325f78ddfd 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -466,7 +466,7 @@ void zend_do_abstract_method(znode *function_name, znode *modifiers, znode *body static zend_bool opline_is_fetch_this(zend_op *opline TSRMLS_DC) { - if (CG(active_class_entry) && (opline->opcode == ZEND_FETCH_W) && (opline->op1.op_type == IS_CONST) + if ((opline->opcode == ZEND_FETCH_W) && (opline->op1.op_type == IS_CONST) && (opline->op1.u.constant.type == IS_STRING) && (opline->op1.u.constant.value.str.len == (sizeof("this")-1)) && !memcmp(opline->op1.u.constant.value.str.val, "this", sizeof("this"))) {