diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2023-02-09 13:09:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-09 13:09:10 +0100 |
commit | 06f0da6d46e360c8ec08bbbf906515e84009e768 (patch) | |
tree | 0bd0b6cf6dc4f11c329e2d230e37177ed2d0314e | |
parent | d0eeb279b7ffe173d4a9911ce5e5b1a00cdb72da (diff) | |
parent | 2a4ab201b7c91b393806a1786daad4e8ece12016 (diff) | |
download | nextcloud-server-06f0da6d46e360c8ec08bbbf906515e84009e768.tar.gz nextcloud-server-06f0da6d46e360c8ec08bbbf906515e84009e768.zip |
Merge pull request #36590 from nextcloud/enh/load-app-once
Make sure application are only loaded once
-rw-r--r-- | lib/private/legacy/OC_App.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index c4c2f089767..2a420fd71ad 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -158,7 +158,10 @@ class OC_App { * @param string $app * @throws Exception */ - public static function loadApp(string $app) { + public static function loadApp(string $app): void { + if (isset(self::$loadedApps[$app])) { + return; + } self::$loadedApps[$app] = true; $appPath = self::getAppPath($app); if ($appPath === false) { |