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. Matthias Vogel commented <span data-processor="relativetime" data-value="2025-10-27T10:24:03+00:00" > 10/27/25, 10:24 </span>

    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?

  2. Patrick Biedert commented <span data-processor="relativetime" data-value="2025-10-28T13:42:28+00:00" > 10/28/25, 13:42 </span>

    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.

  3. Christian Kuhn commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2026-03-18T09:44:21+00:00" > 03/18/26, 09:44 </span>

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