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
*/
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 ) {