Issue Bug Closed

#83058Missing initialization of GraphicalFunctions in LocalImageProcessor

Joschi Kuphal 11/21/17, 14:13 updated 10/02/18, 10:54

Description

On line 164 of typo3/sysext/core/Classes/Resource/Processing/LocalImageProcessor.php an instance of \TYPO3\CMS\Core\Imaging\GraphicalFunctions is created:

$graphicalFunctionsObject = GeneralUtility::makeInstance(GraphicalFunctions::class);

What’s missing, however, is the mandatory call to ->init() afterwards (see method comment “Must always call this when using the class.”). As a result, several configuration settings will be ignored (e.g. $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']) during image processing.

Solution: call the ->init() method right after instantiation.

$graphicalFunctionsObject = GeneralUtility::makeInstance(GraphicalFunctions::class);
$graphicalFunctionsObject->init();

Reviews 2