Commit b0b2a1b3 authored by Daniel Siepmann's avatar Daniel Siepmann Committed by Christian Kuhn
Browse files

[BUGFIX] Prevent undefined array key in AbstractItemProvider

Resolves: #98406
Releases: main, 11.5
Change-Id: I856ebd36c1f8c8906fa6b23834704bd2ee5531ad
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75842


Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Simon Schaufelberger's avatarSimon Schaufelberger <simonschaufi+typo3@gmail.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Simon Schaufelberger's avatarSimon Schaufelberger <simonschaufi+typo3@gmail.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 16dcd211
......@@ -673,7 +673,7 @@ abstract class AbstractItemProvider
// 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);
......@@ -1005,9 +1005,9 @@ abstract class AbstractItemProvider
) {
$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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment