[BUGFIX] Initialize TSFE->config with correct type in PHP 7.1 02/51302/7
authorSascha Egerer <sascha@sascha-egerer.de>
Fri, 13 Jan 2017 09:00:16 +0000 (10:00 +0100)
committerSascha Egerer <sascha@sascha-egerer.de>
Fri, 20 Jan 2017 11:49:27 +0000 (12:49 +0100)
commitf39c2f1c0fcf92c8c4923f9a4e77cc0631834fd5
treea74592fc2ffbc6683df0464bfae9c44a892f4e6c
parentd827be67d53910057b06b6f6a267920fa1342eee
[BUGFIX] Initialize TSFE->config with correct type in PHP 7.1

The TypoScriptFrontendController->config variable must be of type
array but is initialized with an empty string. Since PHP 7.1 there is
a different handling of invalid array usage. If a variable is
accessed as an array but is not an array the value of that variable
becomes a string 'A'.

PHP 7
php > $config = '';
php > $config['foo'] = 'bar';
php > print_r($config)
Array
(
    [foo] => bar
)

PHP 7.1
php > $config = '';
php > $config['foo'] = 'bar';
> Warning: Illegal string offset 'foo' in php shell code on line 1
php > print_r($config)
A

Related PHP "Bug" (It's not a bug, it's a feature)
https://bugs.php.net/bug.php?id=73081

Change-Id: I6d5b75ed60f0506ecacdead01a318fdc26757394
Resolves: #79052
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/51302
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Sascha Egerer <sascha@sascha-egerer.de>
Tested-by: Sascha Egerer <sascha@sascha-egerer.de>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php