Fix Bug #79521.
Closes GH-5462.
. Fixed bug #36365 (scandir duplicates file name at every 65535th file).
(cmb)
. Use SSE2 instructions do locale independent strtolower. (Laruence)
+ . Fixed bug #79521 (Check __set_state structure). (carusogabriel)
- BZ2:
. Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb)
--- /dev/null
+--TEST--
+Testing __set_state() declaration with wrong modifier
+--FILE--
+<?php
+
+class Foo {
+ function __set_state()
+ {
+ }
+}
+
+?>
+--EXPECTF--
+Warning: The magic method Foo::__set_state() must be static in %s on line %d
zend_check_magic_method_attr(fn_flags, ce, "__serialize", 0);
} else if (zend_string_equals_literal(lcname, "__unserialize")) {
zend_check_magic_method_attr(fn_flags, ce, "__unserialize", 0);
+ } else if (zend_string_equals_literal(lcname, "__set_state")) {
+ zend_check_magic_method_attr(fn_flags, ce, "__set_state", 1);
}
return lcname;
public function __wakeup() {}
- public function __set_state() {}
+ public static function __set_state() {}
public function __autoload() {}
}
Modifiers for method TestClass::__set_state():
-0x00000001
+0x00000011
Modifiers for method TestClass::__autoload():
Modifiers for method TestClass::__set_state():
-0x00000001
+0x00000011
Modifiers for method TestClass::__autoload():