cvs: php-src /ext/standard type.c
| From: | Stanislav Malyshev | Date: | Wed, 25 May 2005 10:57:42 +0000 |
| Subject: | cvs: php-src /ext/standard type.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-32007@lists.php.net to get a copy of this message | ||
stas Wed May 25 06:57:42 2005 EDT
Modified files:
/php-src/ext/standard type.c
Log:
fix is_object() on non-php objects
http://cvs.php.net/diff.php/php-src/ext/standard/type.c?r1=1.27&r2=1.28&ty=u
Index: php-src/ext/standard/type.c
diff -u php-src/ext/standard/type.c:1.27 php-src/ext/standard/type.c:1.28
--- php-src/ext/standard/type.c:1.27 Fri Apr 15 18:46:37 2005
+++ php-src/ext/standard/type.c Wed May 25 06:57:40 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: type.c,v 1.27 2005/04/15 22:46:37 sniper Exp $ */
+/* $Id: type.c,v 1.28 2005/05/25 10:57:40 stas Exp $ */
#include "php.h"
#include "php_incomplete_class.h"
@@ -207,6 +207,10 @@
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;