Skip to content

Commit

Permalink
[BUGFIX] Adjust side-effects for TcaSelectItems test cases
Browse files Browse the repository at this point in the history
Resolves: #83980
Related: #83975
Releases: master
Change-Id: I2e8a9f3a5682644ef1dd1f3746be961a93ccafca
Reviewed-on: https://review.typo3.org/55831
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
ohader authored and lolli42 committed Feb 20, 2018
1 parent a00fd09 commit eba3530
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions typo3/sysext/core/Classes/Imaging/IconRegistry.php
Expand Up @@ -745,20 +745,18 @@ protected function registerTCAIcons()
{
$resultArray = [];

$tcaTables = array_keys($GLOBALS['TCA']);
$tcaTables = array_keys($GLOBALS['TCA'] ?? []);
// check every table in the TCA, if an icon is needed
foreach ($tcaTables as $tableName) {
// This method is only needed for TCA tables where typeicon_classes are not configured
if (is_array($GLOBALS['TCA'][$tableName])) {
$tcaCtrl = $GLOBALS['TCA'][$tableName]['ctrl'];
$iconIdentifier = 'tcarecords-' . $tableName . '-default';
if (isset($this->icons[$iconIdentifier])) {
continue;
}
if (isset($tcaCtrl['iconfile'])) {
$resultArray[$iconIdentifier] = $tcaCtrl['iconfile'];
}
$iconIdentifier = 'tcarecords-' . $tableName . '-default';
if (
isset($this->icons[$iconIdentifier])
|| !isset($GLOBALS['TCA'][$tableName]['ctrl']['iconfile'])
) {
continue;
}
$resultArray[$iconIdentifier] = $GLOBALS['TCA'][$tableName]['ctrl']['iconfile'];
}

foreach ($resultArray as $iconIdentifier => $iconFilePath) {
Expand Down

0 comments on commit eba3530

Please sign in to comment.