Issue Bug Closed

#87565All configuration in Install Tool fails due to PHP Warning on non-array TYPO3_CONF_VARS

Sascha Ternes 01/28/19, 17:19 updated 01/30/19, 06:50

Description

When in Composer mode, additional TYPO3_CONF_VARS are set (per vendor/typo3/autoload_include.php put_env() calls which are later copied to TYPO3_CONF_VARS):
- TYPO3_PATH_APP
- TYPO3_PATH_COMPOSER_ROOT
- TYPO3_PATH_ROOT
- TYPO3_PATH_WEB
*These are simple Key-Value entries, not arrays.*

In Install tool, “All configuration” iterates over TYPO3_CONF_VARS and treats all entries as arrays.
See typo3/sysext/install/Classes/Controller/Action/Tool/AllConfiguration.php, line 90:

foreach ($GLOBALS['TYPO3_CONF_VARS'][$sectionName] as $key => $value)

This results in a PHP warning:

#1476107295: PHP Warning: Invalid argument supplied for foreach() in /vendor/typo3/cms/typo3/sysext/install/Classes/Controller/Action/Tool/AllConfiguration.php line 90

I am not aware since when these TYPO3_PATH_XXXXX variables were introduced; it must have been in version >=8.7.11.

I will submit a bugfix patch to AllConfiguration.php that skips non-array TYPO3_CONF_VARS variables.

Reviews 1