diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-03-20 08:53:08 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-20 08:53:08 +0100 |
commit | b10c519cc16ac7cc115becd19bc8eeb3ee2e4c38 (patch) | |
tree | 303a49bd4e386ea8895e07c31f826b15f711ae27 /vendor/composer/ClassLoader.php | |
parent | 2f3f95d3a9473d4b9c15727c960f51026c992094 (diff) | |
parent | 1bdab6e633fd023432ed86ad898da1fe4ddc470f (diff) | |
download | volse-hubzilla-b10c519cc16ac7cc115becd19bc8eeb3ee2e4c38.tar.gz volse-hubzilla-b10c519cc16ac7cc115becd19bc8eeb3ee2e4c38.tar.bz2 volse-hubzilla-b10c519cc16ac7cc115becd19bc8eeb3ee2e4c38.zip |
Merge branch 'dev' into bs4
Diffstat (limited to 'vendor/composer/ClassLoader.php')
-rw-r--r-- | vendor/composer/ClassLoader.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 4626994fd..2c72175e7 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -374,9 +374,13 @@ class ClassLoader $first = $class[0]; if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + foreach ($this->prefixDirsPsr4[$search] as $dir) { + $length = $this->prefixLengthsPsr4[$first][$search]; if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { return $file; } |