diff --git a/Classes/Form/FormDataProvider/TcaCTypeItems.php b/Classes/Form/FormDataProvider/TcaCTypeItems.php index 62447c6..0da7f7e 100644 --- a/Classes/Form/FormDataProvider/TcaCTypeItems.php +++ b/Classes/Form/FormDataProvider/TcaCTypeItems.php @@ -36,7 +36,11 @@ public function addData(array $result) $pageId = !empty($result['effectivePid']) ? (int)$result['effectivePid'] : (int)$result['databaseRow']['pid']; $backendLayoutConfiguration = BackendLayoutConfiguration::createFromPageId($pageId); - $colPos = (int)($result['databaseRow']['colPos'][0] ?? ($result['databaseRow']['colPos'] ?? 0)); + if (is_array($result['databaseRow']['colPos'])) { + $colPos = (int)$result['databaseRow']['colPos'][0]; + } else { + $colPos = (int)$result['databaseRow']['colPos']; + } $columnConfiguration = $backendLayoutConfiguration->getConfigurationByColPos($colPos, $result['databaseRow']['uid']); if (empty($columnConfiguration) || (empty($columnConfiguration['allowed.']) && empty($columnConfiguration['disallowed.']))) { return $result;