aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-07-08 10:43:20 +0200
committerGitHub <noreply@github.com>2024-07-08 10:43:20 +0200
commit39f052407adae530e425df1d85c29be513da5f5e (patch)
treeea56815a1c90a34aff7a1a161cb84e93a9e8ae77 /apps
parentb94a1f7f298bab4b67ba37e65d6d62449798ba2a (diff)
downloadnextcloud-server-39f052407adae530e425df1d85c29be513da5f5e.tar.gz
nextcloud-server-39f052407adae530e425df1d85c29be513da5f5e.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')
-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..254c4155df8 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 (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) {