Edit report at http://bugs.php.net/bug.php?id=51807&edit=1
ID: 51807 Updated by: dtajchre...@php.net Reported by: cybermerlin at ya dot ru Summary: set_exception_handler -Status: Open +Status: Feedback Type: Bug Package: Scripting Engine problem Operating System: win.xp.sp3 PHP Version: 5.3.2 New Comment: Your test script works fine. But the line number in your error doesn't match up with your script so that makes me think your test script is just a snippet of what you're actually using. You need to provide the entire test script that failed, not snippets of one. If the exception_handler function is a class method, you need to change your callback, see: http://php.net/callback Previous Comments: ------------------------------------------------------------------------ [2010-05-13 10:22:02] cybermerlin at ya dot ru Description: ------------ faultCode1faultStringWarning:set_exception_handler() expects the argument (exception_handler) to be a valid callback in C:\WebServers\htdocs\count\new\test.php on line 6 <line 6> if(DEBUG) set_exception_handler('exception_handler'); function exception_handler(Exception $ex){ $str_time = $ex->getFile() .":". $ex->getLine() ." ". htmlentities($ex->getMessage()) ." (". $ex->getCode() .") [". get_class($ex) ."]\r\n"; echo $str_time; } Test script: --------------- if(DEBUG) set_exception_handler('exception_handler'); function exception_handler(Exception $ex){ $str_time = $ex->getFile() .":". $ex->getLine() ." ". htmlentities($ex->getMessage()) ." (". $ex->getCode() .") [". get_class($ex) ."]\r\n"; echo $str_time; } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51807&edit=1