Mattflaschen has uploaded a new change for review.

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

Change subject: No longer need magic number for LIBXML_PARSEHUGE
......................................................................

No longer need magic number for LIBXML_PARSEHUGE

Change-Id: Ic8681c97e69c8753a7864cbcc81e2d620cd81611
---
M includes/parser/Preprocessor_DOM.php
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/305751/1

diff --git a/includes/parser/Preprocessor_DOM.php 
b/includes/parser/Preprocessor_DOM.php
index 5da7cd7..acd8fc9 100644
--- a/includes/parser/Preprocessor_DOM.php
+++ b/includes/parser/Preprocessor_DOM.php
@@ -93,9 +93,9 @@
                if ( !$result ) {
                        // Try running the XML through UtfNormal to get rid of 
invalid characters
                        $xml = UtfNormal\Validator::cleanUp( $xml );
-                       // 1 << 19 == XML_PARSE_HUGE, needed so newer versions 
of libxml2
+                       // LIBXML_PARSEHUGE needed so newer versions of libxml2
                        // don't barf when the XML is >256 levels deep
-                       $result = $dom->loadXML( $xml, 1 << 19 );
+                       $result = $dom->loadXML( $xml, LIBXML_PARSEHUGE );
                }
 
                if ( !$result ) {
@@ -171,9 +171,9 @@
                if ( !$result ) {
                        // Try running the XML through UtfNormal to get rid of 
invalid characters
                        $xml = UtfNormal\Validator::cleanUp( $xml );
-                       // 1 << 19 == XML_PARSE_HUGE, needed so newer versions 
of libxml2
+                       // LIBXML_PARSEHUGE needed so newer versions of libxml2
                        // don't barf when the XML is >256 levels deep.
-                       $result = $dom->loadXML( $xml, 1 << 19 );
+                       $result = $dom->loadXML( $xml, LIBXML_PARSEHUGE );
                }
                if ( $result ) {
                        $obj = new PPNode_DOM( $dom->documentElement );

-- 
To view, visit https://gerrit.wikimedia.org/r/305751
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8681c97e69c8753a7864cbcc81e2d620cd81611
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to