nuxy Posted April 1, 2008 Share Posted April 1, 2008 I have a problem with the function set_exception_handler. I can't seem to get it to work with it calling a function within a class. set_exception_handler($en->handle_error); When I try it that way, it reads the "error_handler" as a variable. Notice: Undefined property: engine::$handle_error in index.php on line 19 set_exception_handler($en->handle_error()); When I try it that way, it reads as a function, but doesn't pass any variables to the function. Warning: Missing argument 1 for engine::handle_error(), called in index.php on line 19 and defined in classes\engine.php on line 279 Warning: Missing argument 2 for engine::handle_error(), called in index.php on line 19 and defined in classes\engine.php on line 279 Warning: Missing argument 3 for engine::handle_error(), called in index.php on line 19 and defined in classes\engine.php on line 279 Warning: Missing argument 4 for engine::handle_error(), called in index.php on line 19 and defined in classes\engine.php on line 279 I have tried with just making a function in the "index.php" script, but it doesn't display anything then. function handle_error($a, $b, $c, $d) { global $en; $en->handle_error($a, $b, $c, $d); return; } set_exception_handler('handle_error'); Does anyone have an idea how I could fix this problem? Link to comment https://forums.phpfreaks.com/topic/98958-problem-with-set_exception_handler/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.