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

Reply via email to