[BUGFIX] Avoid exception for int label column 76/57776/2
authorStephan Großberndt <stephan.grossberndt@typo3.org>
Thu, 2 Aug 2018 11:51:39 +0000 (13:51 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 2 Aug 2018 15:36:18 +0000 (17:36 +0200)
By casting the title column to string for the label of an TCA record an
exception caused by a strict type check is avoided when shortening the
title.

Resolves: #85729
Related: #79440
Releases: master, 8.7
Change-Id: Ie365b92ae73cd766c412d66ff7624eebbbfb3cf7
Reviewed-on: https://review.typo3.org/57776
Reviewed-by: Riny van Tiggelen <info@online-gamer.nl>
Reviewed-by: Jan Stockfisch <jan.stockfisch@googlemail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Classes/Form/FieldWizard/RecordsOverview.php

index 9195b72..3116b94 100644 (file)
@@ -53,7 +53,7 @@ class RecordsOverview extends AbstractNode
         $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
         $recordsOverviewHtml = [];
         foreach ($selectedItems as $selectedItem) {
-            $title = $selectedItem['title'];
+            $title = (string)$selectedItem['title'];
             if (empty($title)) {
                 $title = '[' . $languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.no_title') . ']';
             }