From:             m at digitalsandwich dot com
Operating system: linux 2.6.22-gentoo-r8
PHP version:      5.3CVS-2007-11-26 (CVS)
PHP Bug Type:     Unknown/Other Function
Bug description:  change in call_user_func() argument validation

Description:
------------
In PHP 5.2 it was possible to use call_user_func*() to call a non-static
method statically. In the latest cvs code for PHP 5.3 this will now produce
a warning and does not appear to call the function.

This looks like a regression of http://bugs.php.net/bug.php?id=26543

Reproduce code:
---------------
<?php

class A
{
        public function test()
        {
                echo get_class($this);
        }
}

class B extends A
{
        public function test()
        {
                call_user_func(array('parent', 'test'));
        }
}

$b = new B;
$b->test();

?>


Expected result:
----------------
B

Actual result:
--------------
Warning: call_user_func() expects parameter 1 to be valid callback, array
given in /tmp/test6.php on line 15

-- 
Edit bug report at http://bugs.php.net/?id=43405&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43405&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43405&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43405&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43405&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43405&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43405&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43405&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43405&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43405&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43405&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43405&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43405&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43405&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43405&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43405&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43405&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43405&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43405&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43405&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43405&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43405&r=mysqlcfg

Reply via email to