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:05:12 +0000
commitdde693cdf6cdf3d73b44905847e8c188064eba41 (patch)
tree7371ed8788484f0320412d9cf88c27e083e2558f /apps/settings
parent84e5b477f9984348a4766b2dbc10609ed750dc4b (diff)
downloadnextcloud-server-dde693cdf6cdf3d73b44905847e8c188064eba41.tar.gz
nextcloud-server-dde693cdf6cdf3d73b44905847e8c188064eba41.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) {