From: kkauper at yahoo-inc dot com Operating system: FreeBSD 4 PHP version: 5.2.9 PHP Bug Type: Class/Object related Bug description: __call() accessed via parent:: operator is provided incorrect method name
Description: ------------ If parent::<method-name> (NOTE: this is *not* a static invocation) is called in a child class, and <method-name> does not exist in the parent, the parent's __call() magic method is provided the method name (the $name argument) in lower case. See the code provided to reproduce the problem. The $b->getFoo(); call should output the method name as "getFoo", including the upercase "F" character. Instead, the method name is converted to all lower case. To be consistent with the results of $a->getFoo();, the method name should not be converted to lower case. This issue is probably related to the recently resolved bug # 42937. Reproduce code: --------------- class A { function __call($name, $args) { echo("magic method called: $name\n"); } } class B extends A { function getFoo() { parent::getFoo(); } } $a = new A(); $a->getFoo(); $b = new B(); $b->getFoo(); Expected result: ---------------- magic method called: getFoo magic method called: getFoo Actual result: -------------- magic method called: getFoo magic method called: getfoo -- Edit bug report at http://bugs.php.net/?id=47801&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47801&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47801&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47801&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47801&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47801&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47801&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47801&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47801&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47801&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47801&r=support Expected behavior: http://bugs.php.net/fix.php?id=47801&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47801&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47801&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47801&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47801&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47801&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47801&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47801&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47801&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47801&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47801&r=mysqlcfg