diff options
author | Andrey Borysenko <andrey18106x@gmail.com> | 2023-08-02 17:40:58 +0300 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2023-08-11 01:37:01 +0200 |
commit | c2a8280743d6361339fc8c6188de4063f9ef9268 (patch) | |
tree | 73eeab1da90a13bef54f7878a3cd47ffc15fb023 /lib | |
parent | ebf21bed5135d310116ab9ec61b66be2a621922c (diff) | |
download | nextcloud-server-c2a8280743d6361339fc8c6188de4063f9ef9268.tar.gz nextcloud-server-c2a8280743d6361339fc8c6188de4063f9ef9268.zip |
Fix psalm ci (stub). Wrap server container with try-catch
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php index 4a4c7762595..e201ca29dcf 100644 --- a/lib/base.php +++ b/lib/base.php @@ -1187,8 +1187,12 @@ class OC { if (!$appManager->isInstalled('app_ecosystem_v2')) { return false; } - $appEcosystemV2Service = Server::get(OCA\AppEcosystemV2\Service\AppEcosystemV2Service::class); - return $appEcosystemV2Service->validateExAppRequestToNC($request); + try { + $appEcosystemV2Service = Server::get(OCA\AppEcosystemV2\Service\AppEcosystemV2Service::class); + return $appEcosystemV2Service->validateExAppRequestToNC($request); + } catch (\Psr\Container\NotFoundExceptionInterface|\Psr\Container\ContainerExceptionInterface $e) { + return false; + } } } |