Edit report at http://bugs.php.net/bug.php?id=53915&edit=1

 ID:                 53915
 Updated by:         cataphr...@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] cataphr...@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] cataphr...@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

Reply via email to