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:
 [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

Add a Patch

Pull Requests

Add a Pull Request

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)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 17 16:02:22 2014 UTC