diff --git a/core/modules/system/src/SystemRequirements.php b/core/modules/system/src/SystemRequirements.php index a0da2f2..17a821f 100644 --- a/core/modules/system/src/SystemRequirements.php +++ b/core/modules/system/src/SystemRequirements.php @@ -16,19 +16,19 @@ class SystemRequirements { * The minimum PHP version in the lower range for the introduction * of PDO::MYSQL_ATTR_MULTI_STATEMENTS. */ - public static $minLow = '5.5.21'; + const MIN_LOW = '5.5.21'; /** * The maximum PHP version in the lower range for the introduction * of PDO::MYSQL_ATTR_MULTI_STATEMENTS. */ - public static $maxLow = '5.6.0'; + const MAX_LOW = '5.6.0'; /** * The minimum PHP version in the higher range for the introduction * of PDO::MYSQL_ATTR_MULTI_STATEMENTS. */ - public static $minHigh = '5.6.5'; + const MIN_HIGH = '5.6.5'; /** * Determines whether the passed in PHP version disallows multiple statements. @@ -38,8 +38,8 @@ class SystemRequirements { * @return bool */ public static function phpVersionWithPdoDisallowMultipleStatements($phpversion) { - return (version_compare($phpversion, self::$minLow, '>=') && version_compare($phpversion, self::$maxLow, '<')) - || version_compare($phpversion, self::$minHigh, '>='); + return (version_compare($phpversion, self::MIN_LOW, '>=') && version_compare($phpversion, self::MAX_LOW, '<')) + || version_compare($phpversion, self::MIN_HIGH, '>='); } } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index ef0f615..392fbd9 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -87,7 +87,7 @@ function system_requirements($phase) { } elseif (($phase === 'install' || \Drupal::database()->driver() === 'mysql') && !SystemRequirements::phpVersionWithPdoDisallowMultipleStatements($phpversion)) { $requirements['php']['title'] = t('PHP (multiple statement disabling)'); - $requirements['php']['description'] = t('PHP versions higher than %min_low or %min_high provide built-in SQL injection protection for mysql databases. It is recommended to update.', array('%min_low' => SystemRequirements::$minLow, '%min_high' => SystemRequirements::$minHigh)); + $requirements['php']['description'] = t('PHP versions higher than %min_low or %min_high provide built-in SQL injection protection for mysql databases. It is recommended to update.', array('%min_low' => SystemRequirements::MIN_LOW, '%min_high' => SystemRequirements::MIN_HIGH)); $requirements['php']['severity'] = REQUIREMENT_INFO; } elseif (version_compare($phpversion, DRUPAL_SUGGESTED_PHP) < 0) {