diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-11-04 22:56:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-04 22:56:35 +0100 |
commit | 7795f43b0a74f922e240e6887711348e17fb90cc (patch) | |
tree | a4a0152950139fb23255f68d7aaf6afd8a3b730f /lib | |
parent | 13960b69da2593dcfb0cbaef222ee8b9a33142c0 (diff) | |
parent | ef2fb51065aabb90e8e4234d84a78f4e047f7d1c (diff) | |
download | nextcloud-server-7795f43b0a74f922e240e6887711348e17fb90cc.tar.gz nextcloud-server-7795f43b0a74f922e240e6887711348e17fb90cc.zip |
Merge pull request #17805 from nextcloud/more-application-instance
remove more cases of manual Application instance creation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/AppFramework/App.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index 3b42b28758d..fd91d8d058d 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -77,6 +77,8 @@ class App { $e = new \RuntimeException('App class ' . $applicationClassName . ' is not setup via query() but directly'); $setUpViaQuery = false; + $classNameParts = explode('\\', trim($applicationClassName, '\\')); + foreach ($e->getTrace() as $step) { if (isset($step['class'], $step['function'], $step['args'][0]) && $step['class'] === ServerContainer::class && @@ -84,6 +86,12 @@ class App { $step['args'][0] === $applicationClassName) { $setUpViaQuery = true; break; + } else if (isset($step['class'], $step['function'], $step['args'][0]) && + $step['class'] === ServerContainer::class && + $step['function'] === 'getAppContainer' && + $step['args'][1] === $classNameParts[1]) { + $setUpViaQuery = true; + break; } } |