(Dmitry)
- Fixed bug #30889 (Conflict between __get/__set and ++ operator). (Dmitry)
- Fixed bug #30833 (array_count_values() modifying input array). (Tony)
+- Fixed bug #30820 (static member conflict with $this->member silently
+ ignored). (Dmitry)
- Fixed bug #30819 (Better support for LDAP SASL bind). (Jani)
- Fixed bug #30791 (magic methods (__sleep/__wakeup/__toString) call __call if
object is overloaded). (Dmitry)
--- /dev/null
+--TEST--
+Bug #30820 (static member conflict with $this->member silently ignored)
+--INI--
+error_reporting=4095
+--FILE--
+<?php
+class Blah {
+ private static $x;
+
+ public function show() {
+ Blah::$x = 1;
+ $this->x = 5; // no warning, but refers to different variable
+
+ echo 'Blah::$x = '. Blah::$x ."\n";
+ echo '$this->x = '. $this->x ."\n";
+ }
+}
+
+$b = new Blah();
+$b->show();
+?>
+--EXPECTF--
+Strict Standards: Accessing static property Blah::$x as non static in %sbug30820.php on line 7
+Blah::$x = 1
+
+Strict Standards: Accessing static property Blah::$x as non static in %sbug30820.php on line 10
+$this->x = 5
* continue checking below...
*/
} else {
+ if (!silent && (property_info->flags & ZEND_ACC_STATIC)) {
+ zend_error(E_STRICT, "Accessing static property %s::$%s as non static", zobj->ce->name, Z_STRVAL_P(member));
+ }
return property_info;
}
} else {