Repository navigation
Conversation
…esses private property in child class For private fields, the scope has to be taken into account, otherwise the property info may come from the wrong ce.
Here's how that idea would look like (apply patch on top of this PR): https://gist.github.com/nielsdos/3090a86982cba83124ffc8715ff3e031 |
|
Thank you for reviewing. |
Yes. It's not OK to break API in old versions. |
|
Merged as-is.
Please disregard, I see now this is wrong, I guess I was confused. |
For private fields, the scope has to be taken into account, otherwise the property info may come from the wrong ce.
trace_ce is the class entry for b in the test, so we look up the property info from the wrong ce (should be a).
Maybe this can be improved further by checking
is_derived_class(ce, scope)and then reading the property info from the scope, e.g. by usingreturn zend_get_parent_private_property(op_array->scope, ce, member);instead ofreturn NULL? But that API isn't public though.