Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / config / Resource / GlobResource.php
index 1edd7cd22e44a3a72248d3ff92b4beee0c74f343..e3c3be12cffe58bcd88bba516cb3c503160d857d 100644 (file)
@@ -93,8 +93,8 @@ class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface,
             return;
         }
 
-        if (false === strpos($this->pattern, '/**/') && (defined('GLOB_BRACE') || false === strpos($this->pattern, '{'))) {
-            foreach (glob($this->prefix.$this->pattern, defined('GLOB_BRACE') ? GLOB_BRACE : 0) as $path) {
+        if (0 !== strpos($this->prefix, 'phar://') && false === strpos($this->pattern, '/**/') && (\defined('GLOB_BRACE') || false === strpos($this->pattern, '{'))) {
+            foreach (glob($this->prefix.$this->pattern, \defined('GLOB_BRACE') ? GLOB_BRACE : 0) as $path) {
                 if ($this->recursive && is_dir($path)) {
                     $files = iterator_to_array(new \RecursiveIteratorIterator(
                         new \RecursiveCallbackFilterIterator(
@@ -130,7 +130,7 @@ class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface,
             $regex = substr_replace($regex, '(/|$)', -2, 1);
         }
 
-        $prefixLen = strlen($this->prefix);
+        $prefixLen = \strlen($this->prefix);
         foreach ($finder->followLinks()->sortByName()->in($this->prefix) as $path => $info) {
             if (preg_match($regex, substr('\\' === \DIRECTORY_SEPARATOR ? str_replace('\\', '/', $path) : $path, $prefixLen)) && $info->isFile()) {
                 yield $path => $info;