[TASK] Remove unused code in TYPO3\CMS\Install\SystemEnvironment\Check 72/36672/4
authorFrederic Gaus <gaus@flagbit.de>
Thu, 5 Feb 2015 14:41:18 +0000 (15:41 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 5 Feb 2015 22:42:36 +0000 (23:42 +0100)
Remove code which is never executed since the system environment check
of the Install Tool is omitted in cli mode.

Resolves: #64876
Releases: master

Change-Id: If22117d793b54230dc5ae703df478a91482fa7e6
Reviewed-on: http://review.typo3.org/36672
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Classes/SystemEnvironment/Check.php

index db69ac5..a4a83f6 100644 (file)
@@ -301,24 +301,15 @@ class Check {
                $recommendedMaximumExecutionTime = 240;
                $currentMaximumExecutionTime = ini_get('max_execution_time');
                if ($currentMaximumExecutionTime == 0) {
-                       if (PHP_SAPI === 'cli') {
-                               $status = new Status\OkStatus();
-                               $status->setTitle('Infinite PHP script execution time');
-                               $status->setMessage(
-                                       'Maximum PHP script execution time is always set to infinite (0) in cli mode.' .
-                                       ' The setting used for web requests cannot be checked from command line.'
-                               );
-                       } else {
-                               $status = new Status\WarningStatus();
-                               $status->setTitle('Infinite PHP script execution time');
-                               $status->setMessage(
-                                       'max_execution_time=' . $currentMaximumExecutionTime . LF .
-                                       'While TYPO3 is fine with this, you risk a denial-of-service for your system if for whatever' .
-                                       ' reason some script hangs in an infinite loop. You are usually on the safe side ' .
-                                       ' if it is reduced to ' . $recommendedMaximumExecutionTime . ' seconds:' . LF .
-                                       'max_execution_time=' . $recommendedMaximumExecutionTime
-                               );
-                       }
+                       $status = new Status\WarningStatus();
+                       $status->setTitle('Infinite PHP script execution time');
+                       $status->setMessage(
+                               'max_execution_time=0' . LF .
+                               'While TYPO3 is fine with this, you risk a denial-of-service for your system if for whatever' .
+                               ' reason some script hangs in an infinite loop. You are usually on the safe side ' .
+                               ' if it is reduced to ' . $recommendedMaximumExecutionTime . ' seconds:' . LF .
+                               'max_execution_time=' . $recommendedMaximumExecutionTime
+                       );
                } elseif ($currentMaximumExecutionTime < $minimumMaximumExecutionTime) {
                        $status = new Status\ErrorStatus();
                        $status->setTitle('Low PHP script execution time');