[BUGFIX] Invalid file used to compute image ratio in text with picture 58/28558/3
authorXavier Perseguers <xavier@typo3.org>
Thu, 20 Mar 2014 11:52:57 +0000 (12:52 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Thu, 20 Mar 2014 18:18:51 +0000 (19:18 +0100)
Fixes: #57075
Releases: 6.2
Change-Id: Ided1204857dabf4fb15045056cc8a14010a53ae9
Reviewed-on: https://review.typo3.org/28558
Reviewed-by: Marc Bastian Heinrichs
Tested-by: Marc Bastian Heinrichs
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php

index 527c7d4..d44b99d 100644 (file)
@@ -590,7 +590,12 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
 
                                /** @var $file \TYPO3\CMS\Core\Resource\File */
                                if (MathUtility::canBeInterpretedAsInteger($imgs[$imgKey])) {
-                                       $file = $this->getResourceFactory()->getFileObject((int)$imgs[$imgKey]);
+                                       if ($imgListContainsReferenceUids) {
+                                               $file = $this->getResourceFactory()->getFileReferenceObject((int)$imgs[$imgKey])->getOriginalFile();
+                                       } else {
+                                               $file = $this->getResourceFactory()->getFileObject((int)$imgs[$imgKey]);
+                                       }
+
                                } else {
                                        $file = $this->getResourceFactory()->getFileObjectFromCombinedIdentifier($imgPath . $imgs[$imgKey]);
                                }