diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-06-06 11:09:24 +0200 |
---|---|---|
committer | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2023-07-06 15:21:22 +0200 |
commit | 14719110b9c795a95b23c2278168b9d6123b1a62 (patch) | |
tree | 9919ba8c849e3397e23e46ad9f1fdc3f951d3a7f /lib/public/Util.php | |
parent | 5538a40029da60547798ae6f9e11179c4ee4a642 (diff) | |
download | nextcloud-server-14719110b9c795a95b23c2278168b9d6123b1a62.tar.gz nextcloud-server-14719110b9c795a95b23c2278168b9d6123b1a62.zip |
chore: Replace \OC::$server->query with \OCP\Server::get in /lib
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public/Util.php')
-rw-r--r-- | lib/public/Util.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/public/Util.php b/lib/public/Util.php index 5bb126d26b0..63ed9e835c7 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -49,6 +49,7 @@ namespace OCP; use OC\AppScriptDependency; use OC\AppScriptSort; use bantu\IniGetWrapper\IniGetWrapper; +use Psr\Container\ContainerExceptionInterface; /** * This class provides different helper functions to make the life of a developer easier @@ -83,9 +84,9 @@ class Util { public static function hasExtendedSupport(): bool { try { /** @var \OCP\Support\Subscription\IRegistry */ - $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class); + $subscriptionRegistry = \OCP\Server::get(\OCP\Support\Subscription\IRegistry::class); return $subscriptionRegistry->delegateHasExtendedSupport(); - } catch (AppFramework\QueryException $e) { + } catch (ContainerExceptionInterface $e) { } return \OC::$server->getConfig()->getSystemValueBool('extendedSupport', false); } |