Project

General

Profile

Actions

Bug #87565

closed

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

Added by Sascha Ternes almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2019-01-28
Due date:
% Done:

0%

Estimated time:
1.00 h
TYPO3 Version:
8
PHP Version:
7.0
Tags:
composer
Complexity:
easy
Is Regression:
No
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59576

Actions #2

Updated by Sascha Ternes almost 6 years ago

  • Is Regression changed from Yes to No
Actions #3

Updated by Sascha Ternes almost 6 years ago

  • Assignee deleted (Sascha Ternes)
  • Priority changed from Should have to Won't have this time

I consider this not a bug anymore. In a default Composer-mode installation there will be no non-array TYPO3_CONF_VARS, this was a mistake.

Actions #4

Updated by Benni Mack almost 6 years ago

  • Status changed from Under Review to Closed

Thanks for the info! Will close the ticket.

Actions

Also available in: Atom PDF