summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-02-13 14:49:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-02-13 14:49:26 +0000
commit1e05eec591b8f1d9fdf0530c040ad3a684966a92 (patch)
tree31c372361585bcb4564acd46d3ce102b168d438f /ext/reflection/php_reflection.c
parent11187a40e089cbb9f50fe93531db3d1853835c49 (diff)
downloadphp-git-1e05eec591b8f1d9fdf0530c040ad3a684966a92.tar.gz
Fixed bug #36337 (ReflectionProperty fails to return correct visibility).
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 411e0ece15..d871e36459 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3560,14 +3560,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;