summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-22 17:25:02 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-22 17:25:02 +0100
commit460bafea8a636beb450c939f0bfe57dc0229a8c2 (patch)
treed6cff63d9c9ce1fb70ed6ff082faa922aed7ebfe
parent6aa28037c7d611f91c4f5fa2e4df5b9ab9e51a54 (diff)
parent8e72e51b21df393c5dc91380bf234efdf89cec03 (diff)
downloadnextcloud-server-460bafea8a636beb450c939f0bfe57dc0229a8c2.tar.gz
nextcloud-server-460bafea8a636beb450c939f0bfe57dc0229a8c2.zip
Merge pull request #23484 from owncloud/if-class-is-already-loaded-dont-load-it-again
Dont double load class
-rw-r--r--lib/autoloader.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php
index e7262af0ca9..87a07f6da12 100644
--- a/lib/autoloader.php
+++ b/lib/autoloader.php
@@ -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();