[BUGFIX] Follow-up: Responsive image rendering, CGL 25/24525/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 10 Oct 2013 14:31:02 +0000 (16:31 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 10 Oct 2013 14:34:46 +0000 (16:34 +0200)
Change-Id: I03bd35c36616bae451e7e21e12858f65d13087e5
Resolves: #49723
Releases: 6.2
Reviewed-on: https://review.typo3.org/24525
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index fe46804..3954f84 100644 (file)
@@ -1458,8 +1458,10 @@ class ContentObjectRenderer {
                                        if ($dimension) {
                                                if (strstr($dimension, 'c') !== FALSE && ($dimensionKey === 'width' || $dimensionKey === 'height')) {
                                                        $dimensionParts = explode('c', $dimension, 2);
-                                                       $dimension =  intval($dimensionParts[0] * $pixelDensity) . 'c';
-                                                       if ($dimensionParts[1]) $dimension .= $dimensionParts[1];
+                                                       $dimension = intval($dimensionParts[0] * $pixelDensity) . 'c';
+                                                       if ($dimensionParts[1]) {
+                                                               $dimension .= $dimensionParts[1];
+                                                       }
                                                } else {
                                                        $dimension = intval($dimension * $pixelDensity);
                                                }