From 56ce88b0055edf1fba62a827bb73346c5a66a912 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Fri, 4 Aug 2017 13:39:18 +0200 Subject: [PATCH] TASK: Resolve relations always to array Do not resolve to empty string but array to allow same handling for all relations. --- Classes/Domain/Index/TcaIndexer/RelationResolver.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Classes/Domain/Index/TcaIndexer/RelationResolver.php b/Classes/Domain/Index/TcaIndexer/RelationResolver.php index b09e483..483fa4b 100644 --- a/Classes/Domain/Index/TcaIndexer/RelationResolver.php +++ b/Classes/Domain/Index/TcaIndexer/RelationResolver.php @@ -20,13 +20,10 @@ namespace Codappix\SearchCore\Domain\Index\TcaIndexer; * 02110-1301, USA. */ -use TYPO3\CMS\Backend\Utility\BackendUtility; -use TYPO3\CMS\Core\SingletonInterface as Singleton; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Utility\LocalizationUtility; - use TYPO3\CMS\Backend\Form\FormDataCompiler; use TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord; +use TYPO3\CMS\Core\SingletonInterface as Singleton; +use TYPO3\CMS\Core\Utility\GeneralUtility; /** * Resolves relations from TCA using TCA. @@ -81,7 +78,7 @@ class RelationResolver implements Singleton protected function resolveValue($value, array $tcaColumn) { if ($value === '' || $value === '0') { - return ''; + return []; } if ($tcaColumn['config']['type'] === 'select') { return $this->resolveSelectValue($value, $tcaColumn); @@ -93,7 +90,7 @@ class RelationResolver implements Singleton return $this->resolveInlineValue($tcaColumn); } - return ''; + return []; } /**