[DependencyInjection] Fix missing a trailing slash on windows

This commit is contained in:
Jordi Boggiano 2010-07-20 00:38:44 +02:00 committed by Fabien Potencier
parent ef401180a7
commit 42f1ca42e8

View File

@ -238,7 +238,7 @@ class XmlFileLoader extends FileLoader
$imports = '';
foreach ($schemaLocations as $namespace => $location) {
$parts = explode('/', $location);
$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts) : '';
$drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
$location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));
$imports .= sprintf(' <xsd:import namespace="%s" schemaLocation="%s" />'."\n", $namespace, $location);