1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00

Small tweak. Need to make array and string callback syntax behave the

same way.  Also change "cannot" to "should not" since we obviously
"can" make the call.
This commit is contained in:
Rasmus Lerdorf
2008-02-01 23:09:10 +00:00
parent e8a8acdf39
commit 45db15ad4e
+3 -3
View File
@@ -2412,9 +2412,9 @@ static int zend_is_callable_check_func(int check_flags, zval ***zobj_ptr_ptr, ze
}
} else {
if (error) {
zend_spprintf(error, 0, "non-static method %s::%s() cannot be called statically", (*ce_ptr)->name, fptr->common.function_name);
zend_spprintf(error, 0, "non-static method %s::%s() should not be called statically", (*ce_ptr)->name, fptr->common.function_name);
} else if (retval) {
zend_error(E_STRICT, "Non-static method %s::%s() cannot be called statically", (*ce_ptr)->name, fptr->common.function_name);
zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", (*ce_ptr)->name, fptr->common.function_name);
}
}
}
@@ -2478,7 +2478,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **
return 1;
}
return zend_is_callable_check_func(check_flags|IS_CALLABLE_CHECK_IS_STATIC, zobj_ptr_ptr, NULL, callable, ce_ptr, fptr_ptr, error TSRMLS_CC);
return zend_is_callable_check_func(check_flags, zobj_ptr_ptr, NULL, callable, ce_ptr, fptr_ptr, error TSRMLS_CC);
case IS_ARRAY:
{