]> granicus.if.org Git - php/commitdiff
MFB51: Fixed bug #36337 (ReflectionProperty fails to return correct visibility).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 13 Feb 2006 14:49:54 +0000 (14:49 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 13 Feb 2006 14:49:54 +0000 (14:49 +0000)
ext/reflection/php_reflection.c

index c8af4f9b528e8f0021a25c87dca11bdaa6585832..8c189369c6c9d0d47f26e8680bac0b332ba79feb 100644 (file)
@@ -3578,14 +3578,10 @@ ZEND_METHOD(reflection_property, __construct)
        
        if (!(property_info->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, name_str, name_len + 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, name_str, name_len + 1, (void **) &tmp_info) != SUCCESS) {
                        ce = tmp_ce;
                        property_info = tmp_info;
                        tmp_ce = tmp_ce->parent;