From: Côme Chilliet Date: Tue, 7 Feb 2023 15:06:32 +0000 (+0100) Subject: Make sure application are only loaded once X-Git-Tag: v26.0.0beta3~2^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F36590%2Fhead;p=nextcloud-server.git Make sure application are only loaded once Signed-off-by: Côme Chilliet --- 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) {