Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: ResourceLoaderImage: DomDocument::loadXml rather than 
DomDocument::load
......................................................................

ResourceLoaderImage: DomDocument::loadXml rather than DomDocument::load

Some users are reporting that DomDocument::load can't read the files
on their setups, while they can be read with file_get_contents. So use
that and pass the string to DomDocument::loadXml. The advantage of
DomDocument::load is supposed to be in handling large files, and the
icons here are supposed to be small.

Bug: T107198
Change-Id: I8e4dc4642f9d0c5f01ec5e4061e83bf09d0a4900
---
M includes/resourceloader/ResourceLoaderImage.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/267613/1

diff --git a/includes/resourceloader/ResourceLoaderImage.php 
b/includes/resourceloader/ResourceLoaderImage.php
index 9d5fe38..1f35e1f 100644
--- a/includes/resourceloader/ResourceLoaderImage.php
+++ b/includes/resourceloader/ResourceLoaderImage.php
@@ -272,7 +272,7 @@
         */
        protected function variantize( $variantConf, ResourceLoaderContext 
$context ) {
                $dom = new DomDocument;
-               $dom->load( $this->getPath( $context ) );
+               $dom->loadXml( file_get_contents( $this->getPath( $context ) ) 
);
                $root = $dom->documentElement;
                $wrapper = $dom->createElement( 'g' );
                while ( $root->firstChild ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e4dc4642f9d0c5f01ec5e4061e83bf09d0a4900
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

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

Reply via email to