Merge pull request #23484 from owncloud/if-class-is-already-loaded-dont-load-it-again

Dont double load class
This commit is contained in:
Thomas Müller 2016-03-22 17:25:02 +01:00
commit 460bafea8a
1 changed files with 4 additions and 0 deletions

View File

@ -164,6 +164,10 @@ class Autoloader {
$pathsToRequire = $this->memoryCache->get($class);
}
if(class_exists($class, false)) {
return false;
}
if (!is_array($pathsToRequire)) {
// No cache or cache miss
$pathsToRequire = array();