1
0
Fork 0

[ClassLoader] no need to call str_replace on Windows

pull/4672/head
Tobias Schultze 2015-12-04 15:15:36 +01:00
parent 314741c1ec
commit a76ce9b25a
1 changed files with 1 additions and 1 deletions

View File

@ -344,7 +344,7 @@ class ClassLoader
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = str_replace('\\', DIRECTORY_SEPARATOR, $class) . $ext;
$logicalPathPsr4 = ('\\' !== DIRECTORY_SEPARATOR ? str_replace('\\', DIRECTORY_SEPARATOR, $class) : $class) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {