Skip to content

Commit

Permalink
Merge pull request #17636 from MikeyMJCO/patch-5
Browse files Browse the repository at this point in the history
[dev/core#750] Don't check server variables if we're running in CLI
  • Loading branch information
seamuslee001 authored Jul 9, 2020
2 parents 8bd77e7 + 8a0e49b commit f7d3b28
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Civi/Install/Requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ class Requirements {
*/
protected $system_checks = [
'checkMemory',
'checkServerVariables',
'checkMysqlConnectExists',
'checkJsonEncodeExists',
'checkMultibyteExists',
];

protected $system_checks_web = [
'checkServerVariables',
];

protected $database_checks = [
'checkMysqlConnection',
'checkMysqlVersion',
Expand Down Expand Up @@ -83,6 +86,12 @@ public function checkSystem(array $file_paths) {
$errors[] = $this->$check();
}

if (PHP_SAPI !== 'cli') {
foreach ($this->system_checks_web as $check) {
$errors[] = $this->$check();
}
}

return $errors;
}

Expand Down

0 comments on commit f7d3b28

Please sign in to comment.