ID:               43231
 Updated by:       [EMAIL PROTECTED]
 Reported By:      chuck at horde dot org
 Status:           Assigned
 Bug Type:         Scripting Engine problem
 Operating System: MacOS 10.4
 PHP Version:      5.3CVS-2007-11-10 (CVS)
 Assigned To:      johannes
 New Comment:

Just a reminder on this, since you said you already had the patch?


Previous Comments:
------------------------------------------------------------------------

[2007-11-14 08:03:15] [EMAIL PROTECTED]

And this is HEAD issue too, that's where I simply MFH'd the stuff that
broke this. :)

------------------------------------------------------------------------

[2007-11-10 10:32:31] [EMAIL PROTECTED]

I already have a patch for that, will commit that once I'll boot the
other system

------------------------------------------------------------------------

[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

Reply via email to