#44487 [Opn->Asn]: call_user_method_array issues a warning when throwing an exception

From: Date: Thu, 20 Mar 2008 00:22:29 +0000
Subject: #44487 [Opn->Asn]: 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-123498@lists.php.net to get a copy of this message
ID: 44487 Updated by: dsp@php.net Reported By: dsp@php.net -Status: Open +Status: Assigned Bug Type: Class/Object related Operating System: Linux PHP Version: 5.2.6RC2 -Assigned To: +Assigned To: dsp 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

« previous php.bugs (#123498) next »