Skip to content

Commit

Permalink
[BUGFIX] Prevent undefined array key in AbstractItemProvider
Browse files Browse the repository at this point in the history
Resolves: #98406
Releases: main, 11.5
Change-Id: I856ebd36c1f8c8906fa6b23834704bd2ee5531ad
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75820
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
DanielSiepmann authored and lolli42 committed Sep 22, 2022
1 parent 7e5c9ed commit defedd2
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -753,7 +753,7 @@ protected function processForeignTableClause(array $result, $foreignTableName, $
// is now an array containing uid + table + title + row.
// See TcaGroup data provider for details.
// Pick the first one (always on 0), and use uid only.
$rowFieldValue = $rowFieldValue[0]['uid'] ?? $rowFieldValue[0];
$rowFieldValue = $rowFieldValue[0]['uid'] ?? $rowFieldValue[0] ?? '';
}
if (substr($whereClauseParts[0], -1) === '\'' && $whereClauseSubParts[1][0] === '\'') {
$whereClauseParts[0] = substr($whereClauseParts[0], 0, -1);
Expand Down Expand Up @@ -1085,9 +1085,9 @@ public function translateLabels(array $result, array $itemArray, $table, $fieldN
) {
$label = $languageService->sL($result['pageTsConfig']['TCEFORM.'][$table . '.'][$fieldName . '.']['altLabels.'][$labelIndex]);
} else {
$label = $languageService->sL(trim($item[0]));
$label = $languageService->sL(trim($item[0] ?? ''));
}
$value = strlen((string)$item[1]) > 0 ? $item[1] : '';
$value = strlen((string)($item[1] ?? '')) > 0 ? $item[1] : '';
$icon = !empty($item[2]) ? $item[2] : null;
$groupId = $item[3] ?? null;
$helpText = null;
Expand Down

0 comments on commit defedd2

Please sign in to comment.