[BUGFIX] fixPermissions() on install tool test image 42/55342/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 12 Jan 2018 17:43:08 +0000 (18:43 +0100)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Sat, 13 Jan 2018 11:01:55 +0000 (12:01 +0100)
One of the environment image tests misses an explicit
fixPermissions() call on a created image resulting in
potentially broken file permissions on that file.

Change-Id: Ib7e9da2269aaabdd9cc815d8ff2f0d3841b45444
Resolves: #83549
Releases: master
Reviewed-on: https://review.typo3.org/55342
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
typo3/sysext/install/Classes/Controller/EnvironmentController.php

index e34b3c6..e9e9df3 100644 (file)
@@ -212,8 +212,12 @@ class EnvironmentController extends AbstractController
         );
         $outputFile = PATH_site . 'typo3temp/assets/images/installTool-' . StringUtility::getUniqueId('createTrueTypeFontTestImage') . '.gif';
         imagegif($image, $outputFile);
+        $fileExists = file_exists($outputFile);
+        if ($fileExists) {
+            GeneralUtility::fixPermissions($outputFile);
+        }
         return $this->getImageTestResponse([
-            'fileExists' => file_exists($outputFile),
+            'fileExists' => $fileExists,
             'outputFile' => $outputFile,
             'referenceFile' => PATH_site . 'typo3/sysext/install/Resources/Public/Images/TestReference/Font.gif',
         ]);