Last modified: 2011-04-14 15:14:04 UTC
Created attachment 7451 [details] PHP code for a custom error handler that roughly mimics PHP's built-in error handler, except that it adds an identifying tag to the error message. By changing the error_handler (with set_error_handler), MW could add a HTML identifying tag to the Notices and Warnings that are occasionally output by pages. This would be useful for automatic testing, which would visit various pages and check for the presence of these tags (among other things). A code for the proposed new error_handler function is attached with a few tests. It mimics the 'default' error handler, but puts the errors in a div with an appropriate ID. The output of the tests are also attached as a comment.
Created attachment 7452 [details] Output from the attached code (the test cases). Almost looks like the 'default' output.