]> granicus.if.org Git - php/commitdiff
Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect
authorIlia Alshanetsky <iliaa@php.net>
Wed, 8 Feb 2006 00:36:57 +0000 (00:36 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 8 Feb 2006 00:36:57 +0000 (00:36 +0000)
extended class commentary).

NEWS
ext/reflection/php_reflection.c

diff --git a/NEWS b/NEWS
index 469428d58fdbcd6a1f2e74525f3962a8c6c39c15..022614436c1dba81550c8b8104802f61962bdc3c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,8 @@ PHP                                                                        NEWS
 - Added imap_savebody() that allows message body to be written to a file. (Mike)
 - Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
   on error. (Pierre)
+- Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect 
+  extended class commentary). (Ilia)
 - Fixed bug #36306 (crc32() differ on 32-bit and 64-bit platforms)
   (anight@eyelinkmedia dot com, Pierre)
 - Fixed bug #36303 (foreach on error_zval produces segfault). (Dmitry)
index 54d8e27658f3fa308779fd7288fda54b1e575400..411e0ece159d092da37f49c70d3e6f3f86c0b795 100644 (file)
@@ -1070,14 +1070,10 @@ static void reflection_property_factory(zend_class_entry *ce, zend_property_info
 
        if (!(prop->flags & ZEND_ACC_PRIVATE)) {
                /* we have to seach the class hierarchy for this (implicit) public or protected property */
-               zend_class_entry *tmp_ce = ce->parent;
+               zend_class_entry *tmp_ce = ce;
                zend_property_info *tmp_info;
                
-               while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, prop_name, strlen(prop_name) + 1, (void **) &tmp_info) == SUCCESS) {
-                       if (tmp_info->flags & ZEND_ACC_PRIVATE) {
-                               /* private in super class => NOT the same property */
-                               break;
-                       }
+               while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, prop_name, strlen(prop_name) + 1, (void **) &tmp_info) != SUCCESS) {
                        ce = tmp_ce;
                        prop = tmp_info;
                        tmp_ce = tmp_ce->parent;