Skip to content

Commit

Permalink
DIContainer: don't go trough server getter in query
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed May 17, 2023
1 parent 52fc51f commit 3e03251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/AppFramework/DependencyInjection/DIContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,14 +463,14 @@ public function query(string $name, bool $autoload = true) {

$isServerClass = str_starts_with($name, 'OCP\\') || str_starts_with($name, 'OC\\');
if ($isServerClass && !self::has($name)) {
return $this->getServer()->queryNoApps($name, $autoload);
return $this->server->queryNoApps($name, $autoload);
}

try {
return $this->queryNoFallback($name);
} catch (QueryException $firstException) {
try {
return $this->getServer()->query($name, $autoload);
return $this->server->query($name, $autoload);
} catch (QueryException $secondException) {
if ($firstException->getCode() === 1) {
throw $secondException;
Expand Down

0 comments on commit 3e03251

Please sign in to comment.