diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 25f03bc..51fcdb0 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -186,6 +186,7 @@ function system_requirements($phase) { ]; } + $is_test_site = drupal_valid_test_ua() || getenv('DRUPAL_DEV_SITE_PATH'); if (version_compare($phpversion, DRUPAL_MINIMUM_UPDATE_PHP) < 0) { $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', ['%version' => DRUPAL_MINIMUM_UPDATE_PHP]); $requirements['php']['severity'] = REQUIREMENT_ERROR; @@ -193,17 +194,17 @@ function system_requirements($phase) { } if (version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) { // Allow test installations of Drupal on the minimum update PHP. - $is_test_site = drupal_valid_test_ua() || getenv('DRUPAL_DEV_SITE_PATH'); if ($phase === 'update') { $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', ['%version' => DRUPAL_MINIMUM_PHP]); $requirements['php']['severity'] = REQUIREMENT_WARNING; + return $requirements; } elseif (!$is_test_site) { $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', ['%version' => DRUPAL_MINIMUM_PHP]); $requirements['php']['severity'] = REQUIREMENT_ERROR; + // If PHP is old, it's not safe to continue with the requirements check. + return $requirements; } - // If PHP is old, it's not safe to continue with the requirements check. - return $requirements; } if (version_compare($phpversion, DRUPAL_RECOMMENDED_PHP) < 0) { if ($phase === 'runtime') {