[BUGFIX] Avoid warning caused by missing array key noScale 97/34197/2
authorKay Strobach <typo3@kay-strobach.de>
Fri, 14 Nov 2014 17:22:20 +0000 (18:22 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 15 Nov 2014 10:07:28 +0000 (11:07 +0100)
This fix avoids the warning which can occur, because the array key
noScale is missing during the rendering of an image.

Resolves: #62961
Releases: master, 6.2
Change-Id: I1ed5c97570173ad29992eb2fdcbf04f8c094ec9d
Reviewed-on: http://review.typo3.org/34197
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php

index f642f2f..8db6841 100644 (file)
@@ -2213,7 +2213,7 @@ class GraphicalFunctions {
                                // the image to be scaled!! (that is if no width / height is
                                // given or if the destination w/h matches the original image
                                // dimensions or if the option to not scale the image is set)
-                               $noScale = !$w && !$h || $data[0] == $info[0] && $data[1] == $info[1] || $options['noScale'];
+                               $noScale = !$w && !$h || $data[0] == $info[0] && $data[1] == $info[1] || !empty($options['noScale']);
                                if ($noScale && !$data['crs'] && !$params && !$frame && $newExt == $info[2] && !$mustCreate) {
                                        // Set the new width and height before returning,
                                        // if the noScale option is set