Skip to content

Commit

Permalink
[BUGFIX] Support core FileReference in image size viewhelpers
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrodala authored and NamelessCoder committed Oct 20, 2020
1 parent 21bf3a9 commit 53afafd
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -9,9 +9,10 @@
*/

use FluidTYPO3\Vhs\Utility\ResourceUtility;
use TYPO3\CMS\Core\Resource\FileReference as CoreFileReference;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
use TYPO3\CMS\Extbase\Domain\Model\FileReference as ExtbaseFileReference;
use TYPO3Fluid\Fluid\Core\ViewHelper\Exception;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;

Expand Down Expand Up @@ -86,7 +87,7 @@ public function getInfo()
}
}

if (is_object($src) && $src instanceof FileReference) {
if (is_object($src) && ($src instanceof CoreFileReference || $src instanceof ExtbaseFileReference)) {
$src = $src->getUid();
$treatIdAsUid = false;
$treatIdAsReference = true;
Expand Down

0 comments on commit 53afafd

Please sign in to comment.