mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
Allow calling static methods via call_user_method_* functions.
This commit is contained in:
parent
5de418fde4
commit
5355703cf3
@ -1656,8 +1656,8 @@ PHP_FUNCTION(call_user_method)
|
||||
efree(params);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (Z_TYPE_PP(params[1]) != IS_OBJECT) {
|
||||
php_error(E_WARNING,"2nd argument is not an object\n");
|
||||
if (Z_TYPE_PP(params[1]) != IS_OBJECT && Z_TYPE_PP(params[1]) != IS_STRING) {
|
||||
php_error(E_WARNING,"2nd argument is not an object or class name\n");
|
||||
efree(params);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@ -1693,7 +1693,8 @@ PHP_FUNCTION(call_user_method_array)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(method_name);
|
||||
convert_to_object_ex(obj);
|
||||
if (Z_TYPE_PP(obj) != IS_OBJECT && Z_TYPE_PP(obj) != IS_STRING)
|
||||
convert_to_object_ex(obj);
|
||||
convert_to_array_ex(params);
|
||||
|
||||
params_ar = HASH_OF(*params);
|
||||
|
Loading…
Reference in New Issue
Block a user