Project

General

Profile

Actions

Bug #106034

open

Array to string conversion warning in IconFactory

Added by Patrick Biedert 17 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2025-01-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When having a tca field configuration of type "group", for example

$GLOBALS['TCA']['tx_site_domain_model_foo']['columns']['related'] = [
    'label' => 'LLL:EXT:site/Resources/Private/Language/locallang_db.xlf:tx_site_domain_model_foo.related',
    'config' => [
        'type' => 'group',
        'allowed' => 'tx_site_domain_model_foo',
        'foreign_table' => 'tx_site_domain_model_foo',
        'maxitems' => 1,
    ],
];

and a typeicon_classes configuration like

$GLOBALS['TCA']['tx_site_domain_model_foo']['ctrl']['typeicon_classes'] = [
    'default' => 'actions-extension',
    '0' => 'actions-container',
];
$GLOBALS['TCA']['tx_site_domain_model_foo']['ctrl']['typeicon_column'] = 'related';

you'll get a

PHP Warning: Array to string conversion in vendor/typo3/cms-core/Classes/Imaging/IconFactory.php line 138

when editing a record that already has value in this field. This is because the code expects $row[$column] to be an array of strings, but in this case its an array of arrays.

No data to display

Actions

Also available in: Atom PDF