Issue #2267551 follow-up by jfhovinne: [meta] Deal with PHP requirement vs. Debian PHP version numbering.
parent
f04c96070b
commit
89c6ae701d
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue