Skip to content
Snippets Groups Projects
Commit 913c310c authored by Susanne Moog's avatar Susanne Moog Committed by Georg Ringer
Browse files

[BUGFIX] Allow Extbase FileReference in ImageService

While hardening the ImageService it was restricted to core's
FileReference instead of also allowing extbase FileReferences - the
code for converting them is still there but not reachable anymore due
to the restrictive type hint.

Resolves: #88221
Releases: master
Change-Id: Id6c2ef70182f33cd28d13b4ffba7a8796548ff25
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60567


Tested-by: default avatarRalf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: default avatarMathias Brodala <mbrodala@pagemachine.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarRalf Zimmermann <ralf.zimmermann@tritum.de>
Reviewed-by: default avatarMathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: default avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent 5801d8dc
Branches
Tags
No related merge requests found
......@@ -116,13 +116,13 @@ class ImageService implements \TYPO3\CMS\Core\SingletonInterface
* It should be removed once we do not support string sources for images anymore.
*
* @param string $src
* @param FileInterface|null $image
* @param FileInterface|\TYPO3\CMS\Extbase\Domain\Model\FileReference|null $image
* @param bool $treatIdAsReference
* @return FileInterface
* @throws \UnexpectedValueException
* @internal
*/
public function getImage(string $src, ?FileInterface $image, bool $treatIdAsReference): FileInterface
public function getImage(string $src, $image, bool $treatIdAsReference): FileInterface
{
if ($image === null) {
$image = $this->getImageFromSourceString($src, $treatIdAsReference);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment