Project

General

Profile

Actions

Bug #85729

closed

Exception "htmlspecialchars() expects parameter 1 to be string, integer given" in TCA, if label column consists of an int

Added by Stephan Großberndt over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend API
Target version:
-
Start date:
2017-01-25
Due date:
2017-01-25
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:
On Location Sprint

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.


Related issues 1 (0 open1 closed)

Follows TYPO3 Core - Feature #79440: FormEngine element level refactoringClosed2017-01-24

Actions
Actions

Also available in: Atom PDF