}
-static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_function *proto)
+static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_function *proto TSRMLS_DC)
{
zend_uint i;
/* Only one has a type hint and the other one doesn't */
return 0;
}
- if (fe->common.arg_info[i].class_name.v
- && strcmp(fe->common.arg_info[i].class_name.s, proto->common.arg_info[i].class_name.s)!=0) {
- /* FIXME: Unicode support??? */
+ if (fe->common.arg_info[i].class_name.v &&
+ (fe->common.arg_info[i].class_name_len != proto->common.arg_info[i].class_name_len ||
+ (!UG(unicode) && zend_binary_strcasecmp(fe->common.arg_info[i].class_name.s, fe->common.arg_info[i].class_name_len, proto->common.arg_info[i].class_name.s, proto->common.arg_info[i].class_name_len) != 0) ||
+ (UG(unicode) && zend_u_binary_strcasecmp(fe->common.arg_info[i].class_name.u, fe->common.arg_info[i].class_name_len, proto->common.arg_info[i].class_name.u, proto->common.arg_info[i].class_name_len) != 0))) {
return 0;
}
if (fe->common.arg_info[i].array_type_hint != proto->common.arg_info[i].array_type_hint) {
if (child->common.prototype) {
- if (!zend_do_perform_implementation_check(child, child->common.prototype)) {
+ if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
zend_error(E_COMPILE_ERROR, "Declaration of %v::%v() must be compatible with that of %v::%v()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
}
} else if (EG(error_reporting) & E_STRICT) { /* Check E_STRICT before the check so that we save some time */
- if (!zend_do_perform_implementation_check(child, parent)) {
+ if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
zend_error(E_STRICT, "Declaration of %v::%v() should be compatible with that of %v::%v()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
}
}