aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-08-01 20:02:25 +0200
committerGitHub <noreply@github.com>2024-08-01 20:02:25 +0200
commit44887141489dab26ae74fb0841e8eb987c736221 (patch)
tree7e93c449c7db3b45e5a914aa5ae817b54975d89c
parentf645c9bd74656a7896344a72026de3e8cd21ebb1 (diff)
parentfa84f52c3fbaa40a746b91266f79cc279302f165 (diff)
downloadnextcloud-server-44887141489dab26ae74fb0841e8eb987c736221.tar.gz
nextcloud-server-44887141489dab26ae74fb0841e8eb987c736221.zip
Merge pull request #46353 from nextcloud/skipOPcacheCLI
fix(setupchecks): Skip checking for OPcache settings if running checks from CLI
-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 e3cf4659dbe..22605012058 100644
--- a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
+++ b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
@@ -114,6 +114,11 @@ class PhpOpcacheSetup implements ISetupCheck {
}
public function run(): SetupResult {
+ // Skip OPcache checks if running from CLI
+ if (\OC::$CLI && !$this->iniGetWrapper->getBool('opcache.enable_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) {