Skip to content
Snippets Groups Projects
Commit 06640f91 authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Instantiate ImageService in ImageViewHelper constructor

In #94491 the injection of the ImageService in the
ImageViewHelper was replaced by instantiating
with GeneralUtility. This was done, since the
ImageViewHelper is also used in the install tool,
where no DI of this service is possible.

However, since ImageService can be extended by
third-party ViewHelpers, this then broke when
accessing $this->imageService.

This is now fixed by instantiating  and assigning the
ImageService in the constructor to the $imageService
class variable. This way the DI is still not used, but
backwards compatibility is given.

Resolves: #94728
Related: #94491
Releases: master
Change-Id: Id029a01f7f4f6dabdb2b148ac7b9efcca0f7b0fc
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70245


Tested-by: default avatarDavid Steeb <david.steeb@b13.com>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarRuben Steeb <ruben.steeb@gmail.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarDavid Steeb <david.steeb@b13.com>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarRuben Steeb <ruben.steeb@gmail.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent b7590817
Branches
Tags
No related merge requests found
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