From 110c3376e8f57ace7b78b5af22fc95573ad4fdcb Mon Sep 17 00:00:00 2001 From: Oliver Klee <typo3-coding@oliverklee.de> Date: Wed, 20 Sep 2023 16:09:47 +0200 Subject: [PATCH] [TASK] Treat image width as int instead of bool in EXT:indexed_search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The width of an image is an int and should not be used as a boolean. Resolves: #101977 Releases: main, 12.4 Change-Id: I825d41ac32ebb9297975ab3353c1807eb305f796 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81108 Tested-by: core-ci <typo3@b13.com> Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by: Stefan Bürk <stefan@buerk.tech> --- .../indexed_search/Classes/Controller/SearchController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php index 7c69eec13de8..fe7e9d197502 100644 --- a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php +++ b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php @@ -706,7 +706,7 @@ class SearchController extends ActionController if ($fullPath) { $imageInfo = GeneralUtility::makeInstance(ImageInfo::class, $fullPath); $iconPath = PathUtility::getAbsoluteWebPath($fullPath); - $this->iconFileNameCache[$imageType] = $imageInfo->getWidth() + $this->iconFileNameCache[$imageType] = $imageInfo->getWidth() > 0 ? '<img src="' . $iconPath . '" width="' . $imageInfo->getWidth() . '" height="' . $imageInfo->getHeight() -- GitLab