Issue Bug Closed

#106034Array to string conversion warning in IconFactory

Patrick Biedert 01/30/25, 14:39 updated 03/18/26, 09:44

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 6

  1. Georg Ringer changed Sprint Focus On Location Sprint 04/21/25, 06:41

  2. Matthias Vogel commented 10/27/25, 10:24

    Patrick Biedert wrote:
    > but in this case its an array of arrays.

    I can’t reproduce the case where $row[$column] is an array of arrays.
    In my case, it is always $row[‘related’] = ‘0’ (i.e. not even an array).

    For pages, it does sometimes have $row[‘doktype’] = [‘1’]; however, it never has an array of arrays.

    I tested this with the current master 14.0.0-dev (0f5f90aad52).

    Is something missing that triggers this behaviour?

  3. Patrick Biedert commented 10/28/25, 13:42

    Matthias Vogel wrote in #note-2:
    > I tested this with the current master 14.0.0-dev (0f5f90aad52).

    This issue was related to TYPO3 13.4, I will check if it still relevant in the latest patch release and/or 14.0.0-dev.

  4. Garvin Hicking changed status New Needs Feedback 11/01/25, 23:52

  5. Garvin Hicking commented 11/11/25, 12:23

    Were you maybe able to check this out?

  6. Christian Kuhn commented and changed status Needs Feedback Closed 03/18/26, 09:44

    Hey. I hope its ok to close here for now. Let’s have a fresh issue if this is still an issue.