diff options
-rw-r--r-- | Zend/zend_API.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index cee33f1829..9fec995375 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -212,7 +212,10 @@ static int zend_check_class(zval *obj, zend_class_entry *expected_ce) } for (ce = Z_OBJCE_P(obj); ce != NULL; ce = ce->parent) { - if (!strncmp(ce->name, expected_ce->name, MIN(ce->name_length, expected_ce->name_length))) { + /* + * C'est une UGLY HACK. + */ + if (ce->refcount == expected_ce->refcount) { return 1; } } |