Skip to content
Merged
Changes from 1 commit
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
Next Next commit
fix(setupchecks): Skip checking for OPcache if running from CLI
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf authored and backportbot[bot] committed Aug 1, 2024
commit dde693cdf6cdf3d73b44905847e8c188064eba41
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 (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) {
Expand Down