Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(setupchecks): Skip checking for OPcache settings if running checks from CLI #46964

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ protected function getOpcacheSetupRecommendations(): array {
}

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) {
Expand Down
Loading