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 Feb 5, 2024
1 parent 96d8edd commit 4074848
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 @@ -438,14 +438,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 4074848

Please sign in to comment.