]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure application are only loaded once 36590/head
authorCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 7 Feb 2023 15:06:32 +0000 (16:06 +0100)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 7 Feb 2023 15:06:32 +0000 (16:06 +0100)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
lib/private/legacy/OC_App.php

index c4c2f08976740660f0ec4153b673fe19183352b5..2a420fd71adff03e72c6ac6b5edd4333061394dd 100644 (file)
@@ -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) {