diff options
| author | Stanislav Malyshev <stas@php.net> | 2003-07-03 08:00:10 +0000 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2003-07-03 08:00:10 +0000 |
| commit | 2f96c161df1aeba69cc677c171afc1b106105305 (patch) | |
| tree | 7a69e5050b2690f98a23b8df24f36d03436d5d36 /Zend/zend_builtin_functions.c | |
| parent | 62ea4ebd925f5bcdef0dbc819d33478a3c8cbc13 (diff) | |
| download | php-git-2f96c161df1aeba69cc677c171afc1b106105305.tar.gz | |
fix the get_parent_class fix
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 2db351cfde..084471856d 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -557,7 +557,12 @@ ZEND_FUNCTION(get_parent_class) } if (Z_TYPE_PP(arg) == IS_OBJECT) { - ce = zend_get_class_entry(*arg TSRMLS_CC); + if (Z_OBJ_HT_PP(arg)->get_class_name + && Z_OBJ_HT_PP(arg)->get_class_name(*arg, &name, &name_length, 1 TSRMLS_CC) == SUCCESS) { + RETURN_STRINGL(name, name_length, 0); + } else { + ce = zend_get_class_entry(*arg TSRMLS_CC); + } } else if (Z_TYPE_PP(arg) == IS_STRING) { zend_class_entry **pce; @@ -615,7 +620,7 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass) if (!instance_ce) { efree(lcname); RETURN_FALSE; - } + } if (instanceof_function(instance_ce, *ce TSRMLS_CC)) { retval = 1; |
