소스 검색

[DependencyInjection] restricted supported for only phar URI

Fabien Potencier 14 년 전
부모
커밋
b2a720f2b7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

+ 1 - 1
src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

@@ -285,7 +285,7 @@ class XmlFileLoader extends FileLoader
         $imports = '';
         foreach ($schemaLocations as $namespace => $location) {
             $parts = explode('/', $location);
-            if (preg_match('/^[a-z][a-z\d\+\.\-]*:/i', $location)) { // URI scheme http://tools.ietf.org/html/rfc3986
+            if (preg_match('#^phar://#i', $location)) {
                 $tmpfile = tempnam(sys_get_temp_dir(), 'sf2');
                 if ($tmpfile) {
                     file_put_contents($tmpfile, file_get_contents($location));