php-src/ext/reflection
Arnaud Le Blanc 24b191a4de
Fix ReflectionProperty::getRawValue() and related methods for properties overridden with hooks
`new Reflectionproperty($scope, $propName)` keeps a reference to the
zend_property_info of $propName declared in $scope. In getRawValue() and
related methods, we use this reference to check whether the property is hooked.

Calling `new ReflectionProperty($scope, $propName)->getRawValue($object)` is
equivalent to the expression $object->$propName from scope $scope (except that
it bypasses hooks), and thus may access an overridden property (unless the
original is private). This property may have hooks and different flags.

Here I fetch the effective property info before checking for hooks and
property flags.

Fixes GH-17713
Closes GH-17714
2025-02-07 10:49:02 +01:00
..
tests Fix ReflectionProperty::getRawValue() and related methods for properties overridden with hooks 2025-02-07 10:49:02 +01:00
config.m4 Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) 2024-07-29 00:14:59 +02:00
config.w32 Remove HAVE_* for always available extensions 2019-04-14 11:44:12 -03:00
CREDITS Change some permissions from 755 to 644 2018-08-28 23:26:49 +02:00
php_reflection.c Fix ReflectionProperty::getRawValue() and related methods for properties overridden with hooks 2025-02-07 10:49:02 +01:00
php_reflection.h Lazy objects 2024-08-30 17:30:03 +02:00
php_reflection.stub.php Fix the name of the initializer parameter of ReflectionClass::resetAsLazyGhost() 2024-11-12 18:51:33 +01:00
php_reflection_arginfo.h Fix the name of the initializer parameter of ReflectionClass::resetAsLazyGhost() 2024-11-12 18:51:33 +01:00