call_user_method_array issues a warning when throwing an exception
| 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 commits
[2008-03-20 01:07 UTC] dsp@php.net