#107304FlexForm TcaMigration: PHP warning for empty <items>
Description
I get a PHP Warning when there is a flexform with an empty config.items field:
typo3/sysext/core/Classes/Configuration/Tca/TcaMigration.php:1393 foreach() argument must be of type array|object, string given
We’re using itemsProcFunc to fill in select items, and only have an XML comment as reminder:
<config>
<type>select</type>
<itemsProcFunc>Mogic\Lde\Blog\Ui\Config\Flexform\BlogProcFunc->pageIds</itemsProcFunc>
<renderType>selectSingle</renderType>
<items>
<!-- empty by default -->
</items>
<eval>required</eval>
</config>
The FlexForm parser doesn’t find any child tags in <items> and so uses the string value (minus the comment) as value for items.
TCA migration migrateItemsToAssociativeArray does not check if items is an array and throws a warning.
This happens in TYPO3 v12.4.30 and also main.
Reviews 2
History 26
-
Gerrit Code Review pushed patch set 1 for main to change 90429 status
NewUnder Review 08/18/25, 05:58 -
Gerrit Code Review pushed patch set 2 for main to change 90429 08/18/25, 08:12
-
Gerrit Code Review pushed patch set 3 for main to change 90429 08/18/25, 08:32
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 90431 08/18/25, 11:47
-
Anonymous commented and changed status
Under ReviewResolved done0 %100 % 08/18/25, 11:50 -
Benni Mack changed status
ResolvedClosed 12/02/25, 13:58
Applied in changeset commit:004fbcf0f4dd73bac277d95673dd3c3dd3b73964.