From b09620651cbb72e5a623d47ed409e949b114c7cf Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 20 Aug 2020 14:08:18 +0200 Subject: Don't use deprecated getIniWrapper() anymore Signed-off-by: Joas Schilling --- apps/settings/lib/Controller/CheckSetupController.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'apps/settings/lib/Controller/CheckSetupController.php') diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index 476b58e564a..6d237e04c1c 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -98,6 +98,8 @@ class CheckSetupController extends Controller { private $memoryInfo; /** @var ISecureRandom */ private $secureRandom; + /** @var IniGetWrapper */ + private $iniGetWrapper; public function __construct($AppName, IRequest $request, @@ -112,7 +114,8 @@ class CheckSetupController extends Controller { ILockingProvider $lockingProvider, IDateTimeFormatter $dateTimeFormatter, MemoryInfo $memoryInfo, - ISecureRandom $secureRandom) { + ISecureRandom $secureRandom, + IniGetWrapper $iniGetWrapper) { parent::__construct($AppName, $request); $this->config = $config; $this->clientService = $clientService; @@ -126,6 +129,7 @@ class CheckSetupController extends Controller { $this->dateTimeFormatter = $dateTimeFormatter; $this->memoryInfo = $memoryInfo; $this->secureRandom = $secureRandom; + $this->iniGetWrapper = $iniGetWrapper; } /** @@ -407,25 +411,23 @@ Raw output * @return bool */ protected function isOpcacheProperlySetup() { - $iniWrapper = new IniGetWrapper(); - - if (!$iniWrapper->getBool('opcache.enable')) { + if (!$this->iniGetWrapper->getBool('opcache.enable')) { return false; } - if (!$iniWrapper->getBool('opcache.save_comments')) { + if (!$this->iniGetWrapper->getBool('opcache.save_comments')) { return false; } - if ($iniWrapper->getNumeric('opcache.max_accelerated_files') < 10000) { + if ($this->iniGetWrapper->getNumeric('opcache.max_accelerated_files') < 10000) { return false; } - if ($iniWrapper->getNumeric('opcache.memory_consumption') < 128) { + if ($this->iniGetWrapper->getNumeric('opcache.memory_consumption') < 128) { return false; } - if ($iniWrapper->getNumeric('opcache.interned_strings_buffer') < 8) { + if ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') < 8) { return false; } -- cgit v1.2.3