From 2640b806d6d1f92acebb311ff3518670c58df6b0 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Wed, 25 May 2005 10:58:26 +0000 Subject: [PATCH] fix is_object on non-php objects --- ext/standard/type.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/type.c b/ext/standard/type.c index 3005df1dce..9794354011 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -213,6 +213,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; -- 2.40.0