php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #55719
Patch bug55719.diff revision 2011-09-18 15:51 UTC by laruence@php.net
revision 2011-09-18 15:15 UTC by laruence@php.net
revision 2011-09-18 15:14 UTC by laruence@php.net
revision 2011-09-18 14:54 UTC by laruence@php.net
Patch argument_restriction_002.phpt revision 2011-09-18 15:32 UTC by laruence@php.net
revision 2011-09-18 15:32 UTC by laruence@php.net
revision 2011-09-18 14:55 UTC by laruence@php.net
Patch argument_restriction_005.phpt revision 2011-09-18 15:11 UTC by laruence@php.net
Patch argument_restriction_004.phpt revision 2011-09-18 15:06 UTC by laruence@php.net
Patch argument_restriction_003.phpt revision 2011-09-18 15:06 UTC by laruence@php.net
Patch argument_restriction_001.phpt revision 2011-09-18 14:54 UTC by laruence@php.net

Patch bug55719.diff for Unknown/Other Function Bug #55719

Patch version 2011-09-18 15:15 UTC

Return to Bug #55719 | Download this patch
Patch Revisions: 2011-09-18 15:51 UTC | 2011-09-18 15:15 UTC | 2011-09-18 15:14 UTC | 2011-09-18 14:54 UTC

Developer: laruence@php.net

Line 147 (now 147), was 16 lines, now 14 lines

  +
   static void do_inheritance_check_on_method(zend_function *child, zend_function *parent TSRMLS_DC)
   {
   	zend_uint child_flags;
 @@ -3069,11 +3208,15 @@
 @@ -3069,11 +3208,13 @@
   
   	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 that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
 +			char *method_prototype = zend_get_function_declaration(child->common.prototype TSRMLS_CC);
 +			zend_error(E_ERROR, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, method_prototype); 
 +			efree(method_prototype);
 +			zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype 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)) {
  -			zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 02:01:29 2024 UTC