浏览代码

[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));