summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2022-06-22 18:19:00 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2022-06-22 21:58:13 +0200
commit6e531b5ab5a29b40fb4ad555eb33374e0c89bdea (patch)
treea0a1e753085fbedffbb11d7b24ca0385c7aee304 /lib
parent523572fcea39814794399aab46239e068ba54a22 (diff)
downloadnextcloud-server-6e531b5ab5a29b40fb4ad555eb33374e0c89bdea.tar.gz
nextcloud-server-6e531b5ab5a29b40fb4ad555eb33374e0c89bdea.zip
avoid early DI of IAppManager
- might break install Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Dashboard/Manager.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Dashboard/Manager.php b/lib/private/Dashboard/Manager.php
index e75a36b137f..2aeedf3174e 100644
--- a/lib/private/Dashboard/Manager.php
+++ b/lib/private/Dashboard/Manager.php
@@ -44,11 +44,10 @@ class Manager implements IManager {
private $widgets = [];
private ContainerInterface $serverContainer;
- private IAppManager $appManager;
+ private ?IAppManager $appManager = null;
- public function __construct(ContainerInterface $serverContainer, IAppManager $appManager) {
+ public function __construct(ContainerInterface $serverContainer) {
$this->serverContainer = $serverContainer;
- $this->appManager = $appManager;
}
private function registerWidget(IWidget $widget): void {
@@ -64,6 +63,9 @@ class Manager implements IManager {
}
public function loadLazyPanels(): void {
+ if ($this->appManager === null) {
+ $this->appManager = $this->serverContainer->get(IAppManager::class);
+ }
$services = $this->lazyWidgets;
foreach ($services as $service) {
/** @psalm-suppress InvalidCatch */