From 89c6ae701d69496dc916042c01bd86351a59054f Mon Sep 17 00:00:00 2001 From: webchick Date: Mon, 20 Oct 2014 11:44:35 -0700 Subject: [PATCH] Issue #2267551 follow-up by jfhovinne: [meta] Deal with PHP requirement vs. Debian PHP version numbering. --- core/includes/bootstrap.inc | 9 +++------ core/modules/system/system.install | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 87b03323558..b6cce939103 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -22,15 +22,12 @@ use Drupal\Core\Language\LanguageInterface; /** * Minimum supported version of PHP. - */ -const DRUPAL_MINIMUM_PHP = '5.4.5'; - -/** - * Minimum supported version of PHP on Debian. + * + * Minimum version is 5.4.5, or 5.4.4-14+deb7u14 on Debian Wheezy. * * @see https://www.drupal.org/node/2267551. */ -const DRUPAL_MINIMUM_PHP_DEBIAN = '5.4.4-14+deb7u14'; +define('DRUPAL_MINIMUM_PHP', PHP_VERSION == '5.4.4-14+deb7u14' ? '5.4.4' : '5.4.5'); /** * Minimum recommended value of PHP memory_limit. diff --git a/core/modules/system/system.install b/core/modules/system/system.install index c1751c48349..868b2eba119 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -72,7 +72,7 @@ function system_requirements($phase) { ); } - if (version_compare($phpversion, DRUPAL_MINIMUM_PHP_DEBIAN) < 0 && version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) { + if (version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) { $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP)); $requirements['php']['severity'] = REQUIREMENT_ERROR; // If PHP is old, it's not safe to continue with the requirements check.