1
0
Fork 0

move $length variable outsite foreach (#6828)

the `foreach` over the `prefixDirsPsr4[$search]` won't affect `$length`. 

It's used for the offset of `$logicalPathPsr4`.
pull/6783/head
Pedro de Carvalho 2017-11-30 15:29:30 +00:00 committed by Jordi Boggiano
parent a4b220273e
commit f569833f5a
1 changed files with 1 additions and 1 deletions

View File

@ -379,8 +379,8 @@ class ClassLoader
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
$length = $this->prefixLengthsPsr4[$first][$search];
foreach ($this->prefixDirsPsr4[$search] as $dir) {
$length = $this->prefixLengthsPsr4[$first][$search];
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
return $file;
}