Repository navigation
Commit 86d78cc
committed
Report dynamic property shadowing a private parent in Reflection
ReflectionClass::hasProperty() and getProperty() look the name up in the
class's properties_info table and, on a match, return before checking the
object's dynamic properties. A private property declared on a parent class
lives in that table but isn't visible to the child, so a dynamic property of
the same name went unreported. Fold the accessibility check into the lookup so
an inaccessible private-parent match falls through to the existing
dynamic-property check, matching property_exists().
Fixes GH-22441
Closes GH-224511 parent 60d8e92 commit 86d78cc
3 files changed
Lines changed: 61 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4699 | 4699 | | |
4700 | 4700 | | |
4701 | 4701 | | |
4702 | | - | |
4703 | | - | |
4704 | | - | |
4705 | | - | |
| 4702 | + | |
| 4703 | + | |
| 4704 | + | |
4706 | 4705 | | |
4707 | | - | |
4708 | | - | |
4709 | | - | |
4710 | | - | |
4711 | | - | |
| 4706 | + | |
| 4707 | + | |
| 4708 | + | |
| 4709 | + | |
4712 | 4710 | | |
4713 | | - | |
4714 | 4711 | | |
| 4712 | + | |
4715 | 4713 | | |
4716 | 4714 | | |
4717 | 4715 | | |
| |||
4730 | 4728 | | |
4731 | 4729 | | |
4732 | 4730 | | |
4733 | | - | |
4734 | | - | |
4735 | | - | |
4736 | | - | |
4737 | | - | |
4738 | | - | |
| 4731 | + | |
| 4732 | + | |
| 4733 | + | |
| 4734 | + | |
| 4735 | + | |
| 4736 | + | |
| 4737 | + | |
4739 | 4738 | | |
4740 | 4739 | | |
4741 | 4740 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
0 commit comments