diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-10-11 08:21:24 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-10-11 08:21:24 +0200 |
commit | f6a79338d4ea66f9c341d004951b606b5310b478 (patch) | |
tree | a22bb539d6d5fcd18453167dfcaeaded99b336df /lib/private/ServerContainer.php | |
parent | a373fd584846101ed1b7e12ce8a10cb564446975 (diff) | |
download | nextcloud-server-f6a79338d4ea66f9c341d004951b606b5310b478.tar.gz nextcloud-server-f6a79338d4ea66f9c341d004951b606b5310b478.zip |
Make sure we create an app's Application class just once
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/ServerContainer.php')
-rw-r--r-- | lib/private/ServerContainer.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php index b67b4d1e701..704d207223b 100644 --- a/lib/private/ServerContainer.php +++ b/lib/private/ServerContainer.php @@ -100,8 +100,9 @@ class ServerContainer extends SimpleContainer { if (!isset($this->hasNoAppContainer[$namespace])) { $applicationClassName = 'OCA\\' . $sensitiveNamespace . '\\AppInfo\\Application'; if (class_exists($applicationClassName)) { - new $applicationClassName(); + $app = new $applicationClassName(); if (isset($this->appContainers[$namespace])) { + $this->appContainers[$namespace]->offsetSet($applicationClassName, $app); return $this->appContainers[$namespace]; } } |