mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
fix usage of instanceof here too
This commit is contained in:
parent
4fa6eac1f8
commit
0b6f7bddf4
@ -605,7 +605,10 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC,
|
||||
|
||||
return FAILURE;
|
||||
} else {
|
||||
if (!instanceof_function(Z_OBJCE_PP(parameter), ce TSRMLS_CC)) {
|
||||
if (Z_TYPE_PP(parameter) == IS_OBJECT &&
|
||||
instanceof_function(Z_OBJCE_PP(parameter), ce TSRMLS_CC)) {
|
||||
*object = *parameter;
|
||||
} else {
|
||||
if (!quiet) {
|
||||
zend_error(E_WARNING, "%s() expects parameter 1 to be %s, %s given",
|
||||
get_active_function_name(TSRMLS_C), ce->name,
|
||||
@ -613,8 +616,6 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC,
|
||||
}
|
||||
|
||||
return FAILURE;
|
||||
} else {
|
||||
*object = *parameter;
|
||||
}
|
||||
|
||||
EG(argument_stack).top_element++;
|
||||
|
Loading…
Reference in New Issue
Block a user