php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48533 __callStatic is not invoked for private/protected methods
Submitted: 2009-06-11 20:04 UTC Modified: 2009-06-12 01:05 UTC
From: ladislav at marek dot su Assigned: felipe (profile)
Status: Closed Package: Class/Object related
PHP Version: 5.3CVS-2009-06-11 (snap) OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ladislav at marek dot su
New email:
PHP Version: OS:

 

 [2009-06-11 20:04 UTC] ladislav at marek dot su
Description:
------------
__callStatic is not invoked when called method is defined as private or protected.

Reproduce code:
---------------
class Test
{
    private static function foo()
    {
    }

    public static function __callStatic($name, $args)
    {
        var_dump($name);
    }
}

Test::foo();

Expected result:
----------------
string(3) "foo" 

Actual result:
--------------
Fatal error: Call to private method Test::foo() from context '' in %s on line %i

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-12 01:05 UTC] felipe@php.net
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.

Fixed in 5.3 and HEAD.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC