[BUGFIX] Use a typecast to ensure correct value 70/37770/2
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 12 Mar 2015 08:56:48 +0000 (09:56 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Thu, 12 Mar 2015 11:09:58 +0000 (12:09 +0100)
BackendUtility::getLabelsFromItemsList must use a typecast to compare
values.

Change-Id: I6efecbd4871e8435a41aa4310c5e6db19e9bb280
Resolves: #65689
Releases: master,6.2
Reviewed-on: http://review.typo3.org/37770
Reviewed-by: Peter Kraume <peter.kraume@gmx.de>
Tested-by: Peter Kraume <peter.kraume@gmx.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Classes/Utility/BackendUtility.php

index 0fcafd6..7a1c801 100644 (file)
@@ -1938,7 +1938,7 @@ class BackendUtility {
                                        foreach ($GLOBALS['TCA'][$table]['columns'][$column]['config']['items'] as $itemConfiguration) {
                                                // Loop on all available items
                                                // Keep matches and move on to next value
-                                               if ($aValue == $itemConfiguration[1]) {
+                                               if ((string)$aValue === (string)$itemConfiguration[1]) {
                                                        $labels[] = static::getLanguageService()->sL($itemConfiguration[0]);
                                                        break;
                                                }