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

Pull Requests

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: Sat Dec 21 13:01:31 2024 UTC