diff options
Diffstat (limited to 'lib/public/AppFramework')
-rw-r--r-- | lib/public/AppFramework/App.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index b6ed2da5076..06524e4bf02 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -66,11 +66,16 @@ class App { /** + * @param string $appName * @param array $urlParams an array with variables extracted from the routes * @since 6.0.0 */ public function __construct(string $appName, array $urlParams = []) { - $this->container = new \OC\AppFramework\DependencyInjection\DIContainer($appName, $urlParams); + try { + $this->container = \OC::$server->getRegisteredAppContainer($appName); + } catch (QueryException $e) { + $this->container = new \OC\AppFramework\DependencyInjection\DIContainer($appName, $urlParams); + } } /** |