Last modified: 2011-04-14 15:14:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T25878, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23878 - PHP notices and warnings could be tagged in the HTML for automatic testing
PHP notices and warnings could be tagged in the HTML for automatic testing
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-10 10:31 UTC by Dan Bolser
Modified: 2011-04-14 15:14 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
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. (2.54 KB, application/x-php)
2010-06-10 10:31 UTC, Dan Bolser
Details
Output from the attached code (the test cases). (895 bytes, text/html)
2010-06-10 10:33 UTC, Dan Bolser
Details

Description Dan Bolser 2010-06-10 10:31:35 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.
Comment 1 Dan Bolser 2010-06-10 10:33:50 UTC
Created attachment 7452 [details]
Output from the attached code (the test cases).

Almost looks like the 'default' output.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links