Make sure application are only loaded once

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2023-02-07 16:06:32 +01:00
parent 82498bc50f
commit 2a4ab201b7
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

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