ID: 30146 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Class/Object related Operating System: * -PHP Version: 5.0.1 +PHP Version: 5.0.* Assigned To: helly New Comment:
This bug has been fixed in CVS. 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. Fixed in 5.1-dev, we probably MFH it after 5.0.2 is out. Previous Comments: ------------------------------------------------------------------------ [2004-09-19 00:26:18] [EMAIL PROTECTED] Description: ------------ When calling ReflectionProperty->getValue() on a public static property, getValue() requires an object instance to be passed in, even though this doesn't matter for static public properties. It would be nice if null could be passed in addition to an instance. Reproduce code: --------------- <?php class test { static public $a = 1; } $refl = new ReflectionProperty('test', 'a'); echo $refl->getValue(null); Expected result: ---------------- 1 Actual result: -------------- Warning: getValue() expects parameter 1 to be object, null given in Command line code on line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30146&edit=1