diff --git a/core/install.php b/core/install.php index d367bce..c88ffee 100644 --- a/core/install.php +++ b/core/install.php @@ -25,8 +25,8 @@ // The minimum version is specified explicitly, as DRUPAL_MINIMUM_PHP is not // yet available. It is defined in bootstrap.inc, but it is not possible to // load that file yet as it would cause a fatal error on older versions of PHP. -if (version_compare(PHP_VERSION, '7.0.0') < 0) { - print 'Your PHP installation is too old. Drupal requires at least PHP 7.0.0. See the system requirements page for more information.'; +if (version_compare(PHP_VERSION, '5.5.9') < 0) { + print 'Your PHP installation is too old. Drupal requires at least PHP 5.5.9. See the system requirements page for more information.'; exit; } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 1deb173..eede970 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -186,7 +186,15 @@ function system_requirements($phase) { ]; } - if (version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) { + // @todo Remove once update support is dropped. + if (drupal_valid_test_ua()) { + 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; + return $requirements; + } + } + elseif (version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) { $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', ['%version' => DRUPAL_MINIMUM_PHP]); $requirements['php']['severity'] = ($phase === 'update') ? REQUIREMENT_WARNING : REQUIREMENT_ERROR; // If PHP is old, it's not safe to continue with the requirements check.