Actions
Bug #103838
closedlabel_alt triggers PHP warning when pointing to certain field types
Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-05-15
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Description
When we set label_alt of a table to a field of type select
then a PHP warning is raised:
Array to string conversion in typo3_src-12.4.15/typo3/sysext/backend/Classes/Utility/BackendUtility.php line 1543
This occurs since TYPO3 12.4.15, with older versions there doesn't seem to be a problem. I did the tests with PHP 8.2. I don't know if different PHP versions make any difference.
Steps to reproduce:
- Add the following code in some
EXT:xxxx/Configuration/TCA/Overrides/tt_content.php
$GLOBALS['TCA']['tt_content']['ctrl']['label_alt'] = 'header_layout';
Instead ofheader_layout
you can use any field of typeselect
to trigger the problem. - Clear the cache
- Edit any existing content element
- The warning should be triggered.
The warning is not triggered when creating a new record. If you create a new record you need to close the edit form and edit the record again.
Maybe the problem also occurs for other field types, I only tested select
fields with renderType = 'selectSingle'
Actions