[BUGFIX] Set title for select icons 10/51010/2
authorMarco Huber <mail@marco-huber.de>
Mon, 19 Dec 2016 16:50:02 +0000 (17:50 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 20 Dec 2016 19:10:03 +0000 (20:10 +0100)
Use the select options label as title instead of
an uninitialized variable.

Resolves: #79037
Releases: master, 7.6
Change-Id: I690b687f5dd854556ac799d89c8462f4ce9966a4
Reviewed-on: https://review.typo3.org/51010
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/Element/SelectSingleElement.php

index 2f9b047..0c7605b 100644 (file)
@@ -106,7 +106,7 @@ class SelectSingleElement extends AbstractFormElement
                 ];
             } else {
                 // IS ITEM
-                $icon = !empty($item[2]) ? FormEngineUtility::getIconHtml($item[2], $title, $title) : '';
+                $icon = !empty($item[2]) ? FormEngineUtility::getIconHtml($item[2], $item[0], $item[0]) : '';
                 $selected = $selectedValue === (string)$item[1];
 
                 if ($selected) {