diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-07-08 10:43:20 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-08-01 18:03:36 +0000 |
commit | 1c0bf29a2d57d69adc9e4c7c33e011974d9aa393 (patch) | |
tree | e4104967a4aaad4bd881b34f24e9a4df790ba6b9 /apps/settings | |
parent | 31f1834a20ef20c8b18b0f03badc40dca9e0647d (diff) | |
download | nextcloud-server-1c0bf29a2d57d69adc9e4c7c33e011974d9aa393.tar.gz nextcloud-server-1c0bf29a2d57d69adc9e4c7c33e011974d9aa393.zip |
fix(setupchecks): Skip checking for OPcache if running from CLI
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/lib/SetupChecks/PhpOpcacheSetup.php | 5 |
1 files changed, 5 insertions, 0 deletions
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) { |