php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45089 __callStatic $name case sensitivity
Submitted: 2008-05-26 00:41 UTC Modified: 2008-06-03 19:01 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: danielc at analysisandsolutions dot com Assigned: pollita (profile)
Status: Closed Package: Class/Object related
PHP Version: 5.3CVS-2008-05-26 (snap) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: danielc at analysisandsolutions dot com
New email:
PHP Version: OS:

 

 [2008-05-26 00:41 UTC] danielc at analysisandsolutions dot com
Description:
------------
The value of $name produced by __callStatic() is lower cased but the $name produced by the regular __call() is unchanged.

Please adjust __callStatic() so it doesn't change the case of $name.

Reproduce code:
---------------
class MethodTest {
    public static function __callStatic($name, $arguments) {
        echo "Calling static method '$name' "
             . implode(', ', $arguments). "\n";
    }
}

MethodTest::runTest('in static context');

Expected result:
----------------
Calling static method 'runTest' in static context


Actual result:
--------------
Calling static method 'runtest' in static context


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-26 19:23 UTC] felipe@php.net
Here's a patch:
http://felipe.ath.cx/diff/callstatic.diff

Solve the callback issue too.

I also added two tests in:
http://felipe.ath.cx/diff/tests/

 [2008-06-03 19:01 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: Sun May 05 17:01:31 2024 UTC