stas Wed May 25 06:58:26 2005 EDT
Modified files: (Branch: PHP_5_0)
/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.25&r2=1.25.2.1&ty=u
Index: php-src/ext/standard/type.c
diff -u php-src/ext/standard/type.c:1.25 php-src/ext/standard/type.c:1.25.2.1
--- php-src/ext/standard/type.c:1.25 Thu Apr 1 03:54:44 2004
+++ php-src/ext/standard/type.c Wed May 25 06:58:26 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: type.c,v 1.25 2004/04/01 08:54:44 derick Exp $ */
+/* $Id: type.c,v 1.25.2.1 2005/05/25 10:58:26 stas Exp $ */
#include "php.h"
#include "php_incomplete_class.h"
@@ -213,6 +213,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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php