mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #23484 from owncloud/if-class-is-already-loaded-dont-load-it-again
Dont double load class
This commit is contained in:
commit
460bafea8a
1 changed files with 4 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue