Merge pull request #36590 from nextcloud/enh/load-app-once

Make sure application are only loaded once
pull/36633/head
Côme Chilliet 2023-02-09 13:09:10 +07:00 committed by GitHub
commit 06f0da6d46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

@ -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) {