diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-02-14 21:28:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-14 21:28:49 +0100 |
commit | f3dc0d32dbcc9568321d3442a7bd9f0c3f179cee (patch) | |
tree | d55355df6046de1324e63c67726b27657ccc6f7a /lib | |
parent | ea3fa78a854cd73f93950fa1a6643abbd81de429 (diff) | |
parent | 78abbf72b009bc103c5b39e8765f2d95496157ed (diff) | |
download | nextcloud-server-f3dc0d32dbcc9568321d3442a7bd9f0c3f179cee.tar.gz nextcloud-server-f3dc0d32dbcc9568321d3442a7bd9f0c3f179cee.zip |
Merge pull request #14191 from nextcloud/bugfix/noid/make-testcase-overwrite-service-work-with-app-classes
Make TestCase->overwriteService() work with App classes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/ServerContainer.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php index 40e261df4d6..e1447d2f06b 100644 --- a/lib/private/ServerContainer.php +++ b/lib/private/ServerContainer.php @@ -107,6 +107,10 @@ class ServerContainer extends SimpleContainer { public function query($name) { $name = $this->sanitizeName($name); + if (isset($this[$name])) { + return $this[$name]; + } + // In case the service starts with OCA\ we try to find the service in // the apps container first. if (strpos($name, 'OCA\\') === 0 && substr_count($name, '\\') >= 2) { |