The cshKey is not correctly set up. Check for array as well and use
the first key if it exists.
Resolves: #73574
Releases: master,7.6
Change-Id: I263806a4628ea0cdb28413eefa3f9d2af4141a2c
Reviewed-on: https://review.typo3.org/48383
Tested-by: Marco Bresch <marco.bresch@starfinanz.de>
Reviewed-by: Marco Bresch <marco.bresch@starfinanz.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
$dsPointerFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$fieldName]['config']['ds_pointerField'], true);
$parameterArray['_cshKey'] = $table . '.' . $fieldName;
foreach ($dsPointerFields as $key) {
- if ((string)$row[$key] !== '') {
+ if (is_string($row[$key]) && $row[$key] !== '') {
$parameterArray['_cshKey'] .= '.' . $row[$key];
+ } elseif (is_array($row[$key]) && isset($row[$key][0]) && is_string($row[$key][0]) && $row[$key][0] !== '') {
+ $parameterArray['_cshKey'] .= '.' . $row[$key][0];
}
}
$dsPointerFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$fieldName]['config']['ds_pointerField'], true);
$parameterArray['_cshKey'] = $table . '.' . $fieldName;
foreach ($dsPointerFields as $key) {
- if ((string)$row[$key] !== '') {
+ if (is_string($row[$key]) && $row[$key] !== '') {
$parameterArray['_cshKey'] .= '.' . $row[$key];
+ } elseif (is_array($row[$key]) && isset($row[$key][0]) && is_string($row[$key][0]) && $row[$key][0] !== '') {
+ $parameterArray['_cshKey'] .= '.' . $row[$key][0];
}
}