diff --git a/core/modules/rest/rest.install b/core/modules/rest/rest.install
index 2afe0b536538..4bca69baa0c2 100644
--- a/core/modules/rest/rest.install
+++ b/core/modules/rest/rest.install
@@ -11,12 +11,12 @@
function rest_requirements($phase) {
$requirements = array();
- if (version_compare(PHP_VERSION, '5.6.0') >= 0 && ini_get('always_populate_raw_post_data') != -1) {
+ if (version_compare(PHP_VERSION, '5.6.0', '>=') && version_compare(PHP_VERSION, '7', '<') && ini_get('always_populate_raw_post_data') != -1) {
$requirements['always_populate_raw_post_data'] = array(
'title' => t('always_populate_raw_post_data PHP setting'),
'value' => t('Not set to -1.'),
'severity' => REQUIREMENT_ERROR,
- 'description' => t('The always_populate_raw_post_data PHP setting should be set to -1 in PHP versions 5.6 and up. Please check the PHP manual for information on how to correct this.'),
+ 'description' => t('The always_populate_raw_post_data PHP setting should be set to -1 in PHP version 5.6. Please check the PHP manual for information on how to correct this.'),
);
}
return $requirements;