[BUGFIX] Add missing initialization of GraphicalFunctions 71/54771/2
authorJoschi Kuphal <joschi@tollwerk.de>
Wed, 22 Nov 2017 09:53:06 +0000 (10:53 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 27 Nov 2017 21:43:11 +0000 (22:43 +0100)
Add missing initialization of the GraphicalFunctions helper
during image processing.

Resolves: #83058
Releases: master, 8.7
Change-Id: Ic5552c573f866faf3dcb0e0bc11012d83c805033
Reviewed-on: https://review.typo3.org/54771
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Resource/OnlineMedia/Processing/PreviewProcessing.php
typo3/sysext/core/Classes/Resource/Processing/LocalImageProcessor.php
typo3/sysext/core/Classes/Resource/Processing/LocalPreviewHelper.php
typo3/sysext/core/Classes/Type/File/ImageInfo.php

index 88b59c4..233f0fa 100644 (file)
@@ -247,6 +247,7 @@ class PreviewProcessing
         static $graphicalFunctionsObject = null;
         if ($graphicalFunctionsObject === null) {
             $graphicalFunctionsObject = GeneralUtility::makeInstance(GraphicalFunctions::class);
+            $graphicalFunctionsObject->init();
         }
         return $graphicalFunctionsObject;
     }
index 465903d..7c2c412 100644 (file)
@@ -162,6 +162,7 @@ class LocalImageProcessor implements ProcessorInterface
 
         if ($graphicalFunctionsObject === null) {
             $graphicalFunctionsObject = GeneralUtility::makeInstance(GraphicalFunctions::class);
+            $graphicalFunctionsObject->init();
         }
 
         return $graphicalFunctionsObject;
index b3c7d33..db098ac 100644 (file)
@@ -103,6 +103,7 @@ class LocalPreviewHelper
         ) {
             // Create a default image
             $graphicalFunctions = GeneralUtility::makeInstance(GraphicalFunctions::class);
+            $graphicalFunctions->init();
             $graphicalFunctions->getTemporaryImageWithText(
                 $targetFilePath,
                 'Not imagefile!',
@@ -139,6 +140,7 @@ class LocalPreviewHelper
                 if (!file_exists($targetFilePath)) {
                     // Create an error gif
                     $graphicalFunctions = GeneralUtility::makeInstance(GraphicalFunctions::class);
+                    $graphicalFunctions->init();
                     $graphicalFunctions->getTemporaryImageWithText(
                         $targetFilePath,
                         'No thumb',
index 74170f5..e7d5388 100644 (file)
@@ -125,6 +125,7 @@ class ImageInfo extends FileInfo
 
         if ($graphicalFunctions === null) {
             $graphicalFunctions = GeneralUtility::makeInstance(GraphicalFunctions::class);
+            $graphicalFunctions->init();
         }
 
         return $graphicalFunctions;