From 5894cbb48f5cf121ed20023469951ef9f93621c5 Mon Sep 17 00:00:00 2001 From: Benni Mack <benni@typo3.org> Date: Wed, 10 Apr 2019 05:14:07 +0200 Subject: [PATCH] [BUGFIX] Allow FileInterface for ClickEnlarge ViewHelper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Although the documentation and the internal code allows File and FileReference, the functionality requires a FileReference. FileInterface is more appropriate and $cObj->imageLinkWrap() can deal with File and FileReference. Resolves: #82101 Releases: master, 9.5 Change-Id: I37e4f091fe0598509eef050cb811ad7627f16c21 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60435 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Steffen Frese <steffenf14@gmail.com> Tested-by: Jörg Bösche <typo3@joergboesche.de> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Steffen Frese <steffenf14@gmail.com> Reviewed-by: Jörg Bösche <typo3@joergboesche.de> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> --- .../Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php index 95f9cf2dfe65..da5a322f3500 100644 --- a/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php +++ b/typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php @@ -15,7 +15,6 @@ namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Link; */ use TYPO3\CMS\Core\Resource\FileInterface; -use TYPO3\CMS\Core\Resource\FileReference; use TYPO3\CMS\Core\TypoScript\TypoScriptService; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; @@ -52,7 +51,7 @@ class ClickEnlargeViewHelper extends AbstractViewHelper */ public function initializeArguments() { - $this->registerArgument('image', FileReference::class, 'The original image file', true); + $this->registerArgument('image', FileInterface::class, 'The original image file', true); $this->registerArgument( 'configuration', 'mixed', -- GitLab