This PR introduces skipping the server variable checks if we're running in a CLI environment, removing an error when running Drush commands against Drupal 8 and Drupal 9 based sites.
Fix whitespace errors.
Remove variable comment.
Fix more whitespace!
*/
protected $system_checks = [
'checkMemory',
- 'checkServerVariables',
'checkMysqlConnectExists',
'checkJsonEncodeExists',
'checkMultibyteExists',
];
+ protected $system_checks_web = [
+ 'checkServerVariables',
+ ];
+
protected $database_checks = [
'checkMysqlConnection',
'checkMysqlVersion',
$errors[] = $this->$check();
}
+ if (PHP_SAPI !== 'cli') {
+ foreach ($this->system_checks_web as $check) {
+ $errors[] = $this->$check();
+ }
+ }
+
return $errors;
}