ResourceLoaderImage: Use 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
This commit is contained in:
parent
a4b114b3eb
commit
6c50ba80c3
1 changed files with 1 additions and 1 deletions
|
|
@ -272,7 +272,7 @@ class ResourceLoaderImage {
|
|||
*/
|
||||
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 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue