From 2a4ab201b7c91b393806a1786daad4e8ece12016 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Tue, 7 Feb 2023 16:06:32 +0100 Subject: [PATCH] Make sure application are only loaded once MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/private/legacy/OC_App.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- 2.39.5