Project

General

Profile

Actions

Bug #82651

closed

Prevent same type converters from being registered multiple times

Added by Romain Canon over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Extbase
Target version:
-
Start date:
2017-10-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
type,converter
Complexity:
Is Regression:
Sprint Focus:

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.

Actions

Also available in: Atom PDF