#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.