Skip to content

Commit

Permalink
fix usage of instanceof here too
Browse files Browse the repository at this point in the history
  • Loading branch information
wez committed Aug 2, 2003
1 parent 4fa6eac commit 0b6f7bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,16 +605,17 @@ 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,
zend_zval_type_name(*parameter));
}

return FAILURE;
} else {
*object = *parameter;
}

EG(argument_stack).top_element++;
Expand Down

0 comments on commit 0b6f7bd

Please sign in to comment.