do not break when loading schemas from network paths on Windows

This commit is contained in:
Christian Flothmann 2021-01-04 20:26:31 +01:00
parent 426bf9640a
commit acbafe889d

View File

@ -614,6 +614,8 @@ class XmlFileLoader extends FileLoader
array_shift($parts);
$locationstart = 'phar:///';
}
} elseif ('\\' === \DIRECTORY_SEPARATOR && 0 === strpos($location, '\\\\')) {
$locationstart = '';
}
$drive = '\\' === \DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
$location = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts));