#44487 [Asn->Csd]: call_user_method_array issues a warning when throwing an exception
| From: | dsp@php.net | Date: | Thu, 20 Mar 2008 01:07:38 +0000 |
| Subject: | #44487 [Asn->Csd]: call_user_method_array issues a warning when throwing an exception | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123499@lists.php.net to get a copy of this message | ||
ID: 44487
Updated by: dsp@php.net
Reported By: dsp@php.net
-Status: Assigned
+Status: Closed
Bug Type: Class/Object related
Operating System: Linux
PHP Version: 5.2.6RC2
Assigned To: dsp
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2008-03-20 00:22:15] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44487&edit=1