mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Skip querying the app container for server namespace
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
d7ecbe32d2
commit
3899de12b7
1 changed files with 6 additions and 0 deletions
|
|
@ -442,6 +442,12 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
|||
if ($name === 'AppName' || $name === 'appName') {
|
||||
return $this->appName;
|
||||
}
|
||||
|
||||
$isServerClass = str_starts_with($name, 'OCP\\') || str_starts_with($name, 'OC\\');
|
||||
if ($isServerClass && !$this->has($name)) {
|
||||
return $this->getServer()->query($name, $autoload);
|
||||
}
|
||||
|
||||
try {
|
||||
return $this->queryNoFallback($name);
|
||||
} catch (QueryException $firstException) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue