From 1b9d603765eb6c9cccdeac73158e0d27be4c0c45 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 10 Feb 2026 09:01:14 +0100 Subject: [PATCH] fix(federation): Don't break when federation is disabled Signed-off-by: Joas Schilling --- lib/Service/TrustedServerService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Service/TrustedServerService.php b/lib/Service/TrustedServerService.php index ca09ef370..ea4aafad0 100644 --- a/lib/Service/TrustedServerService.php +++ b/lib/Service/TrustedServerService.php @@ -16,7 +16,7 @@ */ class TrustedServerService { public function __construct( - private readonly TrustedServers $trustedServers, + private readonly ?TrustedServers $trustedServers, private readonly LoggerInterface $logger, ) { } @@ -25,6 +25,10 @@ public function __construct( * @return list */ public function getTrustedServers(): array { + if ($this->trustedServers === null) { + return []; + } + $trustedServers = []; try { foreach ($this->trustedServers->getServers() as $server) {