Bug #63463 [Com]: ReflectionProperty::setValue and ::getValue trigger magic methods
| From: | ocramius at gmail dot com | Date: | Thu, 08 Nov 2012 06:22:43 +0000 |
| Subject: | Bug #63463 [Com]: ReflectionProperty::setValue and ::getValue trigger magic methods | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-174575@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63463&edit=1
ID: 63463
Comment by: ocramius at gmail dot com
Reported by: ocramius at gmail dot com
Summary: ReflectionProperty::setValue and ::getValue trigger
magic methods
Status: Open
Type: Bug
Package: Reflection related
Operating System: Irrelevant
PHP Version: 5.4.8
Block user comment: N
Private report: N
New Comment:
I've added the failing test case as a PR at https://github.com/php/php-src/pull/230
Previous Comments:
------------------------------------------------------------------------
[2012-11-08 06:15:03] ocramius at gmail dot com
Description:
------------
When unset properties are requested, ReflectionProperty::setValue and ReflectionProperty::getValue
trigger __get and __set magic methods.
Test script:
---------------
https://gist.github.com/4037155
Expected result:
----------------
The test script should report NULL for each of the requested values, and never call __set nor __get
Actual result:
--------------
__set and __get are called when ReflectionProperty tries to read or write to the requested
properties.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63463&edit=1