Skip to content

Commit 39f0524

Browse files
authored
fix(setupchecks): Skip checking for OPcache if running from CLI
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
1 parent b94a1f7 commit 39f0524

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/settings/lib/SetupChecks/PhpOpcacheSetup.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ protected function getOpcacheSetupRecommendations(): array {
114114
}
115115

116116
public function run(): SetupResult {
117+
// Skip OPcache checks if running from CLI
118+
if (PHP_SAPI === 'cli') {
119+
return SetupResult::success($this->l10n->t('Checking from CLI, OPcache checks have been skipped.'));
120+
}
121+
117122
[$level,$recommendations] = $this->getOpcacheSetupRecommendations();
118123
if (!empty($recommendations)) {
119124
return match($level) {

0 commit comments

Comments
 (0)