diff options
author | zotlabs <mike@macgirvin.com> | 2017-03-20 11:05:46 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-20 11:05:46 +1100 |
commit | 1bdab6e633fd023432ed86ad898da1fe4ddc470f (patch) | |
tree | a1be386a1078a89909741da89790db7be9a30baa /vendor/composer/ClassLoader.php | |
parent | 1bf2a9d47b9b72fae36ef5b35c1444a159c82adb (diff) | |
parent | 8b4b1350369714a832588c74df3f261b538ec566 (diff) | |
download | volse-hubzilla-1bdab6e633fd023432ed86ad898da1fe4ddc470f.tar.gz volse-hubzilla-1bdab6e633fd023432ed86ad898da1fe4ddc470f.tar.bz2 volse-hubzilla-1bdab6e633fd023432ed86ad898da1fe4ddc470f.zip |
Merge pull request #703 from dawnbreak/oauth2
:arrow_up: Update bshaffer/oauth2-server-php library.
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; } |