note 28868 deleted from ref.errorfunc by aidan

From: Date: Fri, 10 Sep 2004 06:51:52 +0000
Subject: note 28868 deleted from ref.errorfunc by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76378@lists.php.net to get a copy of this message
Note Submitter: webmaster at zdarmanet dot net ---- I use something like this (and of course all necessary stuff like set_error_handler): function myHandler(...) { include(...) // the code loaded in case of error } Then one of my scripts stops execution after the second pass throw a line like: list(...)=mysql_fetch_row(...) The solution is the following: myHandler must return something in case of error number 8 (Notice), i.e. return 0; What value it returns is not significant: I tested it with true and false and it works in all cases. The strangest is that when I include the function code of myHandler staticaly (not via a conditional include), it works without the return statement! The PHP construct list or the function mysql_fetch_row might use this error number for other usage than error reporting and it's a pitty that these details are not listed here in the manual. Not to say it was very hard to find out where the problem was because the problem was inside an error handler and PHP does not allow recursive call to an error handler.

« previous php.notes (#76378) next »