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 #1

Updated by Stephan Großberndt over 6 years ago

  • Due date set to 2017-01-25
  • Start date changed from 2018-08-02 to 2017-01-25
  • Follows Feature #79440: FormEngine element level refactoring added
Actions #2

Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57776

Actions #3

Updated by Tymoteusz Motylewski over 6 years ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Gerrit Code Review over 6 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57780

Actions #5

Updated by Stephan Großberndt over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF