$_SERVER['SCRIPT_FILENAME'] when using router). (Laruence)
. "Connection: close" instead of "Connection: closed" (Gustavo)
+- Core:
+ . Fixed bug #61761 ('Overriding' a private static method with a different
+ signature causes crash). (Laruence)
+
- JSON
. Fixed bug #61537 (json_encode() incorrectly truncates/discards
information). (Adam)
(merge after 5.3.11 release)
- Core:
- . Fixed bug #61728 (PHP crash when calling ob_start in request_shutdown phase). (Laruence)
+ . Fixed bug #61728 (PHP crash when calling ob_start in request_shutdown
+ phase). (Laruence)
. Fixed bug #61660 (bin2hex(hex2bin($data)) != $data). (Nikita Popov)
. Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables
(without apache2)). (Laruence)
--- /dev/null
+--TEST--
+Bug #61761 ('Overriding' a private static method with a different signature causes crash)
+--FILE--
+<?php
+
+class A
+{
+ private static function test($a) { }
+}
+
+class B extends A
+{
+ private static function test($a, $b) { }
+}
+
+?>
+--EXPECTF--
+Strict Standards: Declaration of B::test() should be compatible with A::test($a) in %sbug61761.php on line %d
if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
- zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype TSRMLS_CC));
+ zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC));
}
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
- char *method_prototype = zend_get_function_declaration(child->common.prototype TSRMLS_CC);
+ char *method_prototype = zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC);
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, method_prototype);
efree(method_prototype);
}