Skip to content

Commit 0a6b074

Browse files
author
Ilia Alshanetsky
committed
Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect
extended class commentary).
1 parent 7deff63 commit 0a6b074

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ PHP NEWS
2020
- Added imap_savebody() that allows message body to be written to a file. (Mike)
2121
- Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
2222
on error. (Pierre)
23+
- Fixed bug #36308 (ReflectionProperty::getDocComment() does not reflect
24+
extended class commentary). (Ilia)
2325
- Fixed bug #36306 (crc32() differ on 32-bit and 64-bit platforms)
2426
(anight@eyelinkmedia dot com, Pierre)
2527
- Fixed bug #36303 (foreach on error_zval produces segfault). (Dmitry)

ext/reflection/php_reflection.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -1070,14 +1070,10 @@ static void reflection_property_factory(zend_class_entry *ce, zend_property_info
10701070

10711071
if (!(prop->flags & ZEND_ACC_PRIVATE)) {
10721072
/* we have to seach the class hierarchy for this (implicit) public or protected property */
1073-
zend_class_entry *tmp_ce = ce->parent;
1073+
zend_class_entry *tmp_ce = ce;
10741074
zend_property_info *tmp_info;
10751075

1076-
while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, prop_name, strlen(prop_name) + 1, (void **) &tmp_info) == SUCCESS) {
1077-
if (tmp_info->flags & ZEND_ACC_PRIVATE) {
1078-
/* private in super class => NOT the same property */
1079-
break;
1080-
}
1076+
while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, prop_name, strlen(prop_name) + 1, (void **) &tmp_info) != SUCCESS) {
10811077
ce = tmp_ce;
10821078
prop = tmp_info;
10831079
tmp_ce = tmp_ce->parent;

0 commit comments

Comments
 (0)