Project

General

Profile

Actions

Bug #83058

closed

Missing initialization of GraphicalFunctions in LocalImageProcessor

Added by Joschi Kuphal about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Image Cropping
Target version:
Start date:
2017-11-21
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

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();
Actions

Also available in: Atom PDF