Bug #49074 [Opn->Csd]: private class static fields can be modified by using reflection
Edit report at https://bugs.php.net/bug.php?id=49074&edit=1
ID: 49074
Updated by: nikic@php.net
Reported by: 1000235409 at smail dot shnu dot edu dot cn
Summary: private class static fields can be modified by using
reflection
-Status: Open
+Status: Closed
Type: Bug
Package: Reflection related
Operating System: *
PHP Version: 5.2, 5.3, HEAD
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Closing as this seems to have been fixed.
Previous Comments:
------------------------------------------------------------------------
[2009-08-02 02:49:37] 1000235409 at smail dot shnu dot edu dot cn
BUT I THINK THAT PHP SHOULD PROVIDE THE PROPERTIES DEFINED IN ITS PARENT CLASSES. And should be
modifiable by using Reflection.
IF NOT, this can also be done by creating a reflection related object of its parent class.
FOR I WAS IMMPLEMENTING a serializing, including serializing the static properties for php. If it
can not get private static properties, I must re-write my code again.
I JUST WANT TO FIX THE BUG brought by the '&'.
I WISH PHP CAN HAS A FULLY-supported RTTI.
------------------------------------------------------------------------
[2009-08-01 21:10:17] felipe@php.net
Complementing the fix:
ReflectionClass::getStaticProperties() was changed to do not return the private properties from
parent class; behavior already adopted in ReflectionClass::getDefaultProperties() and
ReflectionClass::getProperties(). (PHP >= 5.2.11)
------------------------------------------------------------------------
[2009-08-01 01:01:43] svn@php.net
Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=286606
Log: - Added test for bug #49074
------------------------------------------------------------------------
[2009-08-01 00:50:26] jani@php.net
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2009-08-01 00:48:34] svn@php.net
Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=286605
Log: - Fixed bug #49074 (private class static fields can be modified by using reflection)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=49074
--
Edit this bug report at https://bugs.php.net/bug.php?id=49074&edit=1
Thread (6 messages)