aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-07-08 10:43:20 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-08-01 18:03:36 +0000
commit1c0bf29a2d57d69adc9e4c7c33e011974d9aa393 (patch)
treee4104967a4aaad4bd881b34f24e9a4df790ba6b9 /apps/settings
parent31f1834a20ef20c8b18b0f03badc40dca9e0647d (diff)
downloadnextcloud-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.php5
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) {