#21463 [NEW]: Overload __call method argument lowercase

From: Date: Mon, 06 Jan 2003 15:48:43 +0000
Subject: #21463 [NEW]: Overload __call method argument lowercase
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-29201@lists.php.net to get a copy of this message
From: hfuecks@phppatterns.com Operating system: Windows NT 4 PHP version: 4.3.0 PHP Bug Type: Class/Object related Bug description: Overload __call method argument lowercase Seems the magic __call() function used with the overload extension is converting the name of the function called (the first argument of __call()) to lowercase. Best summarized with a script; <?php class Test { function Test () { echo ('Test constructed<br />'); } function __call($method,$args) { echo ( 'Method called: '.$method.'<br />' ); switch ( $method ) { case 'testa': echo ('testa('.$args[0].') success<br />'); break; case 'TestB': echo ('TestB('.$args[0].') success<br />'); break; case 'TESTC': echo ('TESTC('.$args[0].') success<br />'); break; default: echo ('Method unknown<br />'); break; } } } overload('Test'); $o=new Test(); $o->testa(1); $o->TestA(2); $o->TESTA(3); $o->testb(1); $o->TestB(2); $o->TESTB(3); $o->testc(1); $o->TestC(2); $o->TESTC(3); ?> Output of above script; Test constructed Method called: testa testa(1) success Method called: testa testa(2) success Method called: testa testa(3) success Method called: testb Method unknown Method called: testb Method unknown Method called: testb Method unknown Method called: testc Method unknown Method called: testc Method unknown Method called: testc Method unknown -- Edit bug report at http://bugs.php.net/?id=21463&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21463&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21463&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21463&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21463&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21463&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21463&r=support Expected behavior: http://bugs.php.net/fix.php?id=21463&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21463&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21463&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21463&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21463&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21463&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21463&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21463&r=gnused

« previous php.bugs (#29201) next »