Project

General

Profile

Actions

Bug #30598

closed

PHP warning on each Extension Manager invocation

Added by Dmitry Dulepov over 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Category:
Extension Manager
Target version:
Start date:
2011-10-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change I7bfd31677efb3cef07c0752486071e00d9ce889e has been pushed to the review server.
It is available at http://review.typo3.org/5581

Actions #2

Updated by Dmitry Dulepov over 12 years ago

  • Status changed from New to Under Review
  • Target version set to 4.6.0-RC1
  • % Done changed from 0 to 90
  • Complexity set to easy
Actions #3

Updated by Dmitry Dulepov over 12 years ago

Actually there are three warnings:

Core: Error handler (BE): PHP Warning: Invalid argument supplied for foreach() in /....../Projects/TYPO3/TYPO3-master/t3lib/class.t3lib_div.php line 1559
Core: Error handler (BE): PHP Warning: array_map(): Argument #2 should be an array in /....../Projects/TYPO3/TYPO3-master/t3lib/class.t3lib_div.php line 1555
Core: Error handler (BE): PHP Warning: explode() expects parameter 2 to be string, array given in /....../Projects/TYPO3/TYPO3-master/t3lib/class.t3lib_div.php line 1553

Actions #4

Updated by Mr. Hudson over 12 years ago

Patch set 1 of change I7f33221cb9068b6d914951f045ce4dc1e0bcaa37 has been pushed to the review server.
It is available at http://review.typo3.org/5621

Actions #5

Updated by Dmitry Dulepov over 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 90 to 100
Actions #6

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF