Issue Bug Closed

#30598PHP warning on each Extension Manager invocation

Dmitry Dulepov 10/06/11, 09:46 updated 10/24/17, 20:19

Description

The following warning appears each time in the sys_log when the Extension Manager is callled:

Core: Error handler (BE): PHP Warning: Invalid argument supplied for foreach()
in /...../Projects/TYPO3/TYPO3-master/t3lib/class.t3lib_div.php line 1559

The cause is near line 176 in class.tx_em_extensionmanager.php. Here is how this line looks like:

'selectedLanguages' => t3lib_div::trimExplode(',', $globalSettings['selectedLanguages'], TRUE),

Above that near line 139:

$globalSettings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['em']);
if (!is_array($globalSettings)) {
    $globalSettings = array(
        'displayMyExtensions' => 0,
        'selectedLanguages' => array(),
        'inlineToWindow' => 1,
    );
}

There should be a string assignment, not array.

Reviews 2