From 1c0bf29a2d57d69adc9e4c7c33e011974d9aa393 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:43:20 +0200 Subject: fix(setupchecks): Skip checking for OPcache if running from CLI Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- apps/settings/lib/SetupChecks/PhpOpcacheSetup.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/settings') diff --git a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php index a89916f5edb..371ef9289e8 100644 --- a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php +++ b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php @@ -131,6 +131,11 @@ class PhpOpcacheSetup implements ISetupCheck { } public function run(): SetupResult { + // Skip OPcache checks if running from CLI + if (PHP_SAPI === 'cli') { + return SetupResult::success($this->l10n->t('Checking from CLI, OPcache checks have been skipped.')); + } + [$level,$recommendations] = $this->getOpcacheSetupRecommendations(); if (!empty($recommendations)) { return match($level) { -- cgit v1.2.3