[BUGFIX] PHP7 always_populate_raw_post_data is removed. 77/42977/4
authorAlexander Opitz <opitz.alexander@googlemail.com>
Wed, 2 Sep 2015 06:45:01 +0000 (08:45 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 4 Sep 2015 06:39:59 +0000 (08:39 +0200)
Since PHP7 always_populate_raw_post_data in php.ini is removed. This
means that the absense of this setting is like setting it to -1 for
PHP 5.6 installations. We give a OkStatus in InstallTool for PHP7.

Resolves: #69378
Releases: master
Change-Id: Iab2ca2077c508dbeec90b97bfd41dd7c992ebb74
Reviewed-on: http://review.typo3.org/42977
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/install/Classes/SystemEnvironment/Check.php

index ba8d555..0719b94 100644 (file)
@@ -473,15 +473,19 @@ class Check {
        }
 
        /**
-        * Check that always_populate_raw_post_data has been set to -1 on PHP 5.6 or newer
+        * Check that always_populate_raw_post_data has been set to -1 on PHP between 5.6 and 7.0
         *
         * @return Status\StatusInterface
         */
        protected function checkAlwaysPopulateRawPostDataSetting() {
                $minimumPhpVersion = '5.6.0';
+               $maximumPhpVersion = '7.0.0';
                $currentPhpVersion = phpversion();
                $currentAlwaysPopulaterRawPostDataSetting = ini_get('always_populate_raw_post_data');
-               if (version_compare($currentPhpVersion, $minimumPhpVersion) >= 0 && $currentAlwaysPopulaterRawPostDataSetting !== '-1') {
+               if (version_compare($currentPhpVersion, $maximumPhpVersion) >= 0) {
+                       $status = new Status\OkStatus();
+                       $status->setTitle('PHP always_populate_raw_post_data is removed as of PHP 7.0 or newer');
+               } elseif (version_compare($currentPhpVersion, $minimumPhpVersion) >= 0 && $currentAlwaysPopulaterRawPostDataSetting !== '-1') {
                        $status = new Status\ErrorStatus();
                        $status->setTitle('PHP always_populate_raw_post_data is deprecated');
                        $status->setMessage(