Commit live hack: pass XML_PARSE_HUGE (code uses 1 << 19 because the constant isn...
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 9 Sep 2011 11:28:00 +0000 (11:28 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 9 Sep 2011 11:28:00 +0000 (11:28 +0000)
commiteb7e4881ea7287cae89e6082334104c82b0a9ac3
tree70e55edf3fc48b4bdb96c3f5ded5f949b6342fa5
parent8148f72d4cfebb1cdef2783dc96220cf7bdbc0ae
Commit live hack: pass XML_PARSE_HUGE (code uses 1 << 19 because the constant isn't available for some reason) into DOMDocument::loadXML() if the first call to loadXML() failed. This prevents newer versions of libxml2 from throwing a warning and messing up when the XML contains structures that are nested more than 256 levels deep. RELEASE-NOTES added to the 1.18 file, tagging this for backporting to 1.18 too.

We at Wikimedia never noticed this issue until we upgraded libxml2 on one of our servers as part of an OS upgrade, but apparently the interwebs knew about this since at least May 2010. Hat tip
 to http://deriksmith.livejournal.com/57617.html , where I found this fix.
RELEASE-NOTES-1.18
includes/parser/Preprocessor_DOM.php