Browse Source

[Validator] fixed Xliff loader to use forward slashes in file path

Bulat Shakirzyanov 14 years ago
parent
commit
bb51e7cb26

+ 1 - 1
src/Symfony/Component/Validator/MessageInterpolator/XliffMessageInterpolator.php

@@ -59,7 +59,7 @@ class XliffMessageInterpolator implements MessageInterpolatorInterface
             throw new \Exception(implode("\n", $this->getXmlErrors()));
         }
 
-        $parts = explode('/', __DIR__.'/schema/dic/xliff-core/xml.xsd');
+        $parts = explode('/', str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd');
         $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : '';
         $location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));