[php-src] PR #24153: Fix GH-24147: Reflection name/class can be modified by compound assignment
| From: | lazerg | Date: | Tue, 06 Oct 2026 00:54:18 +0000 |
| Subject: | [php-src] PR #24153: Fix GH-24147: Reflection name/class can be modified by compound assignment | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39193@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24153
Author: lazerg
Plain assignment to
$name/$class on reflection objects already throws from
write_property, but compound assignment, ++/-- and
&$r->name go through get_property_ptr_ptr, which reflection
didn't override, so they wrote to the property slot directly. This adds a
get_property_ptr_ptr handler that throws the same "Cannot set read-only
property" exception for those two properties.
Fixes #24147