php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63614 Fatal error on Reflection
Submitted: 2012-11-26 20:33 UTC Modified: -
From: dev at pp3345 dot de Assigned:
Status: Closed Package: Reflection related
PHP Version: 5.3.19 OS: Debian Squeeze
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dev at pp3345 dot de
New email:
PHP Version: OS:

 

 [2012-11-26 20:33 UTC] dev at pp3345 dot de
Description:
------------
Test script leads to a fatal error. Seems to happen with both PHP 5.3 and 5.4.

Test script:
---------------
<?php

class Test
{
  const A   = 0;

  public function func()
  {
    static $a  = array(
      self::A   => 'a'
    );
  }
}

$reflect = new ReflectionMethod('Test', 'func');
$reflect->getStaticVariables();

?>


Expected result:
----------------
No Fatal Error.

Actual result:
--------------
Fatal error: Cannot access self:: when no class scope is active in test.php on 
line 16

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-27 05:34 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=df3b9a1e0791803b1d9f9300d8f36dd981126bc7
Log: Fixed Bug #63614 (Fatal error on Reflection)
 [2012-11-27 05:34 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2012-11-27 05:36 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=df3b9a1e0791803b1d9f9300d8f36dd981126bc7
Log: Fixed Bug #63614 (Fatal error on Reflection)
 [2012-11-27 05:37 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=df3b9a1e0791803b1d9f9300d8f36dd981126bc7
Log: Fixed Bug #63614 (Fatal error on Reflection)
 [2012-11-27 05:38 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=df3b9a1e0791803b1d9f9300d8f36dd981126bc7
Log: Fixed Bug #63614 (Fatal error on Reflection)
 [2012-12-19 17:55 UTC] derick@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=df3b9a1e0791803b1d9f9300d8f36dd981126bc7
Log: Fixed Bug #63614 (Fatal error on Reflection)
 [2014-10-07 23:21 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=df3b9a1e0791803b1d9f9300d8f36dd981126bc7
Log: Fixed Bug #63614 (Fatal error on Reflection)
 [2014-10-07 23:32 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=df3b9a1e0791803b1d9f9300d8f36dd981126bc7
Log: Fixed Bug #63614 (Fatal error on Reflection)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 12:01:29 2025 UTC