php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44487 call_user_method_array issues a warning when throwing an exception
Submitted: 2008-03-20 00:22 UTC Modified: 2008-03-20 01:07 UTC
From: dsp@php.net Assigned: dsp (profile)
Status: Closed Package: Class/Object related
PHP Version: 5.2.6RC2 OS: Linux
Private report: No CVE-ID: None
 [2008-03-20 00:22 UTC] dsp@php.net
Description:
------------
call_user_method_array issues a "cannot call method foo()" warning when  an exception is thrown.


Reproduce code:
---------------
class Foo
{
        public function bar()
        {
                throw new Exception();
        }

        public function test()
        {
                call_user_func_array(array($this, 'bar'), array());
        }
}

try {
        $bar = new Foo();
        call_user_method_array('test', $bar, array()) ;

} catch (Exception $e) {
}


Expected result:
----------------
no output

Actual result:
--------------
Warning: call_user_method_array(): Unable to call test() in /path/to/call.php on line 17


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-20 01:07 UTC] dsp@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC