File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ PHP NEWS
2
2
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3
3
?? ??? 2013, PHP 5.5.6
4
4
5
+ - Core:
6
+ . Fixed bug #65911 (scope resolution operator - strange behavior with $this).
7
+ (Bob Weinand)
8
+
5
9
17 Oct 2013, PHP 5.5.5
6
10
7
11
- Core:
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #65911 (scope resolution operator - strange behavior with $this)
3
+ --FILE--
4
+ <?php
5
+ class A {}
6
+
7
+ class B
8
+ {
9
+ public function go ()
10
+ {
11
+ $ this ->foo = 'bar ' ;
12
+ echo A::$ this ->foo ; // should not output 'bar'
13
+ }
14
+ }
15
+
16
+ $ obj = new B ();
17
+ $ obj ->go ();
18
+ ?>
19
+ --EXPECTF--
20
+ Fatal error: Access to undeclared static property: A::$this in %s on line %d
Original file line number Diff line number Diff line change @@ -908,6 +908,7 @@ static zend_bool opline_is_fetch_this(const zend_op *opline TSRMLS_DC) /* {{{ */
908
908
{
909
909
if ((opline -> opcode == ZEND_FETCH_W ) && (opline -> op1_type == IS_CONST )
910
910
&& (Z_TYPE (CONSTANT (opline -> op1 .constant )) == IS_STRING )
911
+ && ((opline -> extended_value & ZEND_FETCH_STATIC_MEMBER ) != ZEND_FETCH_STATIC_MEMBER )
911
912
&& (Z_HASH_P (& CONSTANT (opline -> op1 .constant )) == THIS_HASHVAL )
912
913
&& (Z_STRLEN (CONSTANT (opline -> op1 .constant )) == (sizeof ("this" )- 1 ))
913
914
&& !memcmp (Z_STRVAL (CONSTANT (opline -> op1 .constant )), "this" , sizeof ("this" ))) {
You can’t perform that action at this time.
0 commit comments