From: Stanislav Malyshev Date: Wed, 25 May 2005 10:57:40 +0000 (+0000) Subject: fix is_object() on non-php objects X-Git-Tag: php-5.0.1b1~169 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47294288fe1b89fd22215e821a9f7d98f5cabc3e;p=php fix is_object() on non-php objects --- diff --git a/ext/standard/type.c b/ext/standard/type.c index 2687f8c083..2cda025a03 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -207,6 +207,10 @@ static void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type) if (Z_TYPE_PP(arg) == type) { if (type == IS_OBJECT) { zend_class_entry *ce; + if(Z_OBJ_HT_PP(arg)->get_class_entry == NULL) { + /* if there's no get_class_entry it's not a PHP object, so it can't be INCOMPLETE_CLASS */ + RETURN_TRUE; + } ce = Z_OBJCE_PP(arg); if (!strcmp(ce->name, INCOMPLETE_CLASS)) { RETURN_FALSE;