fix usage of instanceof here too

This commit is contained in:
Wez Furlong 2003-08-02 11:43:55 +00:00
parent 4fa6eac1f8
commit 0b6f7bddf4

View File

@ -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++;