Bug #82651
closedPrevent same type converters from being registered multiple times
100%
Description
About the issue¶
Currently, calling the method \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerTypeConverter
several times with the same type converter class name will lead to duplicate entries being added to $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['typeConverters']
.
This can lead to issues when type converters are being used just after a strong cache clearing (the clear cache from the install tool). In this case, the type converters are registered twice because of the way the localconf files are re-included in the same runtime, after the caches were cleared.
This issue does not impact external code in any way, until you actually need to use these type converters early in the runtime. Indeed, the property mapper will then throw a DuplicateTypeConverterException
because Extbase default type converters were registered twice.
Envisaged solution¶
Make the global array containing the type converters class names use unique values.
This won't affect the current behaviour of the DuplicateTypeConverterException
which is meant for type converters of different classes with the same targets.