#41884 [Asn->Csd]: ReflectionClass::getDefaultProperties() does not handle static attributes

From: Date: Wed, 11 Jul 2007 22:07:07 +0000
Subject: #41884 [Asn->Csd]: ReflectionClass::getDefaultProperties() does not handle static attributes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-114944@lists.php.net to get a copy of this message
ID: 41884 Updated by: tony2001@php.net Reported By: sebastian@php.net -Status: Assigned +Status: Closed Bug Type: Feature/Change Request Operating System: Irrelevant PHP Version: 5CVS-2007-07-03 (CVS) -Assigned To: helly +Assigned To: tony2001 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. Previous Comments: ------------------------------------------------------------------------ [2007-07-03 09:10:16] tony2001@php.net Here is a patch for it: http://dev.daylessday.org/diff/bug41884.diff but I'd like to hear Marcus opinion before committing it. ------------------------------------------------------------------------ [2007-07-03 08:35:29] sebastian@php.net Description: ------------ Static properties with default values do not appear in the result of ReflectionClass::getDefaultProperties(). Reproduce code: --------------- <?php class Foo { protected static $fooStatic = 'foo'; protected $foo = 'foo'; } $class = new ReflectionClass('Foo'); print_r($class->getDefaultProperties()); Expected result: ---------------- Array ( [fooStatic] => foo [foo] => foo ) Actual result: -------------- Array ( [foo] => foo ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41884&edit=1

« previous php.bugs (#114944) next »