1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00

better fix...

This commit is contained in:
Wez Furlong
2003-08-01 17:51:56 +00:00
parent 3253746c26
commit 5c4de2664c

View File

@@ -393,14 +393,17 @@ static char *zend_parse_arg_impl(zval **arg, va_list *va, char **spec TSRMLS_DC)
{
zval **p = va_arg(*va, zval **);
zend_class_entry *ce = va_arg(*va, zend_class_entry *);
if (!instanceof_function(Z_OBJCE_PP(arg), ce TSRMLS_CC)) {
if (Z_TYPE_PP(arg) == IS_OBJECT &&
instanceof_function(Z_OBJCE_PP(arg), ce TSRMLS_CC)) {
*p = *arg;
} else {
if (Z_TYPE_PP(arg) == IS_NULL && return_null) {
*p = NULL;
} else {
return ce->name;
}
} else
*p = *arg;
}
}
break;