Page MenuHomePhabricator

Silence Lingo even in debug log
Open, Needs TriagePublicBUG REPORT

Description

Lingo uses DOMDocument to parse HTML. DOMDocument is kind of noisy for HTML5 and, as a result, the call to DOMDocument::loadHTML is surrounded by AtEase::suppressWarnings().

This doesn't stop backtraces from showing up in the debug log, though.

The "right" solution is to probably use Dom\HTMLDocument which is available in PHP 8+, But, following a suggestion in the comments on the documentation, I found that using LIBXML_NOERROR does the job as well.

Event Timeline

Change #1150761 had a related patch set uploaded (by MarkAHershberger; author: MarkAHershberger):

[mediawiki/extensions/Lingo@master] Don't complain about unrecognized HTML5 tags and entities.

https://gerrit.wikimedia.org/r/1150761

MarkAHershberger renamed this task from Silence Lingo even in debug lot to Silence Lingo even in debug log.May 26 2025, 9:11 PM