#85729Exception "htmlspecialchars() expects parameter 1 to be string, integer given" in TCA, if label column consists of an int
Description
In TYPO3 9 and 8.7 the exception "htmlspecialchars() expects parameter 1 to be string, integer given" is thrown when accessing a record with a TCA definition where “ctrl”->“label” points to a column defined as integer in ext_tables.sql
return [
'ctrl' => [
'label' => 'year',
],
'columns' => [
'year' => [
'label' => 'Year',
'config' => [
'type' => 'input',
'size' => 4,
'eval' => 'year'
]
]
]
];
CREATE TABLE tx_myext_year ( uid int(10) unsigned NOT NULL auto_increment, pid int(10) unsigned NOT NULL default '0', year smallint(5) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (uid), KEY year (year) );
This is a regression in TYPO3 8.7 caused by the patch https://review.typo3.org/#/c/51151/ [!!!][FEATURE] FormEngine element level refactoring because it declares declare(strict_types = 1); in typo3/sysext/backend/Classes/Form/FieldWizard/RecordsOverview.php – in TYPO3 7.6 this works without issues.