Merge pull request #9658 from Ayesh/improve/class-autoloader-conditional-path
Minor improvement to ClassLoader::register no-op blockpull/9662/head
commit
1e72b23fd3
|
@ -311,8 +311,10 @@ class ClassLoader
|
|||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||
|
||||
if (null === $this->vendorDir) {
|
||||
//no-op
|
||||
} elseif ($prepend) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($prepend) {
|
||||
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
||||
} else {
|
||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||
|
|
Loading…
Reference in New Issue