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:05:12 +0000 |
commit | dde693cdf6cdf3d73b44905847e8c188064eba41 (patch) | |
tree | 7371ed8788484f0320412d9cf88c27e083e2558f /apps/settings | |
parent | 84e5b477f9984348a4766b2dbc10609ed750dc4b (diff) | |
download | nextcloud-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.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) { |