Explorar el Código

[Routing] Fix missing a trailing slash on windows

Jordi Boggiano hace 15 años
padre
commit
13d890c880
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Symfony/Components/Routing/Loader/XmlFileLoader.php

+ 1 - 1
src/Symfony/Components/Routing/Loader/XmlFileLoader.php

@@ -133,7 +133,7 @@ class XmlFileLoader extends FileLoader
     protected function validate($dom, $file)
     protected function validate($dom, $file)
     {
     {
         $parts = explode('/', str_replace('\\', '/', __DIR__.'/schema/routing/routing-1.0.xsd'));
         $parts = explode('/', str_replace('\\', '/', __DIR__.'/schema/routing/routing-1.0.xsd'));
-        $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts) : '';
+        $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
         $location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));
         $location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));
 
 
         $current = libxml_use_internal_errors(true);
         $current = libxml_use_internal_errors(true);