Bug #53915 [Asn->Csd]: ReflectionClass::getConstants emits fatal error on selfreferencing constants.
| From: | cataphract@php.net | Date: | Thu, 03 Feb 2011 12:45:47 +0000 |
| Subject: | Bug #53915 [Asn->Csd]: ReflectionClass::getConstants emits fatal error on selfreferencing constants. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-158453@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53915&edit=1
ID: 53915
Updated by: cataphract@php.net
Reported by: david at grudl dot com
Summary: ReflectionClass::getConstants emits fatal error on
selfreferencing constants.
-Status: Assigned
+Status: Closed
Type: Bug
Package: Reflection related
PHP Version: Irrelevant
Assigned To: cataphract
Block user comment: N
Private report: N
New Comment:
Fixed in 5.3 and trunk.
Previous Comments:
------------------------------------------------------------------------
[2011-02-03 13:45:32] cataphract@php.net
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=307971
Log: - Simpler fix for bug #53915.
------------------------------------------------------------------------
[2011-02-03 13:38:27] cataphract@php.net
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=307970
Log: - Fixed bug #53915: ReflectionClass::getConstant(s) emits fatal
error on
constants with self::.
- Reflown some NEWS entries to have lines no longer than 80 chars.
------------------------------------------------------------------------
[2011-02-03 04:07:18] david at grudl dot com
Description:
------------
This code throws fatal error: Cannot access self:: when no class scope
is active
Test script:
---------------
class Foo
{
const A = 1;
const B = self::A;
}
$rc = new ReflectionClass('Foo');
$rc->getConstants(); // crashes
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53915&edit=1