[BUGFIX] Disabled SystemEnvironment check in CLI context 54/35954/2
authorFrans Saris <franssaris@gmail.com>
Sun, 11 Jan 2015 16:47:25 +0000 (17:47 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 19 Jan 2015 12:54:39 +0000 (13:54 +0100)
SystemEnvironment check should not be run in CLI context as
this can give false results.

The php.ini used for CLI can be different from the one used
by the webserver. This may result in false warnings and/or
errors in the email report.

Resolves: #56569
Releases: master, 6.2
Change-Id: Id448853c98342e43f7d82fa7bab9954f2a26f949
Reviewed-on: http://review.typo3.org/35954
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/ext_tables.php

index 2d3adfa..4b4ee33 100644 (file)
@@ -4,9 +4,13 @@ defined('TYPO3_MODE') or die();
 if (TYPO3_MODE === 'BE') {
        // Register report module additions
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['typo3'][] = \TYPO3\CMS\Install\Report\InstallStatusReport::class;
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = \TYPO3\CMS\Install\Report\EnvironmentStatusReport::class;
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['security'][] = \TYPO3\CMS\Install\Report\SecurityStatusReport::class;
 
+       // Only add the environment status report if not in CLI mode
+       if (!defined('TYPO3_cliMode') || !TYPO3_cliMode) {
+               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = \TYPO3\CMS\Install\Report\EnvironmentStatusReport::class;
+       }
+
        // Register backend module
        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
                'TYPO3.CMS.' . $_EXTKEY,