ID: 43231 Updated by: [EMAIL PROTECTED] Reported By: chuck at horde dot org -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: MacOS 10.4 PHP Version: 5.3CVS-2007-11-10 (CVS) -Assigned To: +Assigned To: johannes New Comment:
I already have a patch for that, will commit that once I'll boot the other system Previous Comments: ------------------------------------------------------------------------ [2007-11-10 03:20:27] chuck at horde dot org Description: ------------ The callback syntax of array('classname', 'methodname') for making static method calls is now enforcing E_STRICT even if E_STRICT is not on. So methods that are not explicitly declared static can't be used this way even with E_STRICT off. Putting static in front of the function makes it work, but of course results in a parse error when the code is run under PHP 4. Reproduce code: --------------- <?php class Test { function hello() { echo "hello\n"; } } call_user_func(array('Test', 'hello')); Expected result: ---------------- hello Actual result: -------------- Warning: call_user_func() expects parameter 1 to be valid callback, array given in /Users/chuck/callback.php on line 11 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43231&edit=1