[php-src] PR #22451: Fix GH-22441: reflection misses dynamic prop shadowing private parent
| From: | iliaal | Date: | Thu, 25 Jun 2026 12:07:14 +0000 |
| Subject: | [php-src] PR #22451: Fix GH-22441: reflection misses dynamic prop shadowing private parent | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36635@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22451
Author: iliaal
Fixes #22441. ReflectionClass::hasProperty() and getProperty() returned a match from properties_info
without first checking the object's dynamic properties. A private property on a parent class
sits in that table but is invisible to the child, so a dynamic property shadowing it was reported
missing, even though property_exists() and getProperties() report it. The accessibility test now
folds into the lookup, so an inaccessible private-parent match falls through to the dynamic-property
check.