[BUGFIX] Add missing initialization of GraphicalFunctions 17/54717/5
authorJoschi Kuphal <joschi@tollwerk.de>
Wed, 22 Nov 2017 09:53:06 +0000 (10:53 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 27 Nov 2017 08:36:27 +0000 (09:36 +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/54717
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
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 faecdb5..938d54e 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 a90d753..6f804ac 100644 (file)
@@ -103,6 +103,7 @@ class LocalPreviewHelper
         ) {
             // Create a default image
             $graphicalFunctions = GeneralUtility::makeInstance(GraphicalFunctions::class);
+            $graphicalFunctions->init();
             $graphicalFunctions->getTemporaryImageWithText(
                 $targetFilePath,
                 'Not imagefile!',
@@ -138,6 +139,7 @@ class LocalPreviewHelper
                 if (!file_exists($targetFilePath)) {
                     // Create an error gif
                     $graphicalFunctions = GeneralUtility::makeInstance(GraphicalFunctions::class);
+                    $graphicalFunctions->init();
                     $graphicalFunctions->getTemporaryImageWithText(
                         $targetFilePath,
                         'No thumb',
index e5072ee..a630063 100644 (file)
@@ -117,6 +117,7 @@ class ImageInfo extends FileInfo implements LoggerAwareInterface
 
         if ($graphicalFunctions === null) {
             $graphicalFunctions = GeneralUtility::makeInstance(GraphicalFunctions::class);
+            $graphicalFunctions->init();
         }
 
         return $graphicalFunctions;