diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-02-20 15:27:45 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-02-20 15:27:45 +0000 |
commit | 4ea898b79fc1c859bb9f59a84a90a30ba5ddf4be (patch) | |
tree | 1e852173e5d3259f4a58b8e2aca07fbee0fb21e5 /ext | |
parent | 089f1283adf1bfd37e84f732ef3dc2a22f81d285 (diff) | |
download | php-git-4ea898b79fc1c859bb9f59a84a90a30ba5ddf4be.tar.gz |
Fixed bug #36434 (Improper resolution of declaring class name of an
inherited property).
Diffstat (limited to 'ext')
-rw-r--r-- | ext/reflection/php_reflection.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 13498ed418..da19d9a1b9 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3789,11 +3789,19 @@ ZEND_METHOD(reflection_property, getDeclaringClass) { reflection_object *intern; property_reference *ref; + zend_class_entry *tmp_ce, *ce; + zend_property_info *tmp_info; METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0); GET_REFLECTION_OBJECT_PTR(ref); - zend_reflection_class_factory(ref->ce, return_value TSRMLS_CC); + ce = tmp_ce = ref->ce; + while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, ref->prop->name, ref->prop->name_length + 1, (void **) &tmp_info) == SUCCESS) { + ce = tmp_ce; + tmp_ce = tmp_ce->parent; + } + + zend_reflection_class_factory(ce, return_value TSRMLS_CC); } /* {{{ proto public string ReflectionProperty::getDocComment() |