1
0
Fork 0

[ClassLoader] Got an if-condition out of a unnecessary loop

pull/489/head
Baptiste "Talus" Clavie 2012-03-22 11:12:30 +01:00
parent b11f72eed7
commit 6782287091
1 changed files with 2 additions and 2 deletions

View File

@ -181,8 +181,8 @@ class ClassLoader
$classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
foreach ($this->prefixes as $prefix => $dirs) {
foreach ($dirs as $dir) {
if (0 === strpos($class, $prefix)) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
return $dir . DIRECTORY_SEPARATOR . $classPath;
}