[BUGFIX] Fix invalid explode in RTE language fetching 01/50001/3
authorMarkus Klein <markus.klein@typo3.org>
Wed, 21 Sep 2016 14:10:49 +0000 (16:10 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 21 Sep 2016 20:12:59 +0000 (22:12 +0200)
Resolves: #78030
Releases: master
Change-Id: I86dafc95375c3320d70e08fb32de2860d089b828
Reviewed-on: https://review.typo3.org/50001
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/rtehtmlarea/Classes/Extension/Language.php
typo3/sysext/rtehtmlarea/Classes/Form/Element/RichTextElement.php

index 3faa6a6..d226b75 100644 (file)
@@ -113,12 +113,11 @@ class Language extends RteHtmlAreaApi
                 $labelFields[] = $table . '.' . $titleField;
             }
 
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-                ->getQueryBuilderForTable($table);
+            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
 
-            $result = $queryBuilder
+            $queryBuilder
                 ->select($table . '.lg_iso_2', $table . '.lg_country_iso_2')
-                ->addSelect(...GeneralUtility::trimExplode(',', $labelFields, true))
+                ->addSelect(...$labelFields)
                 ->from($table)
                 ->where($queryBuilder->expr()->eq('lg_constructed', 0));
 
index 89e7df2..e5051d6 100644 (file)
@@ -1149,7 +1149,7 @@ class RichTextElement extends AbstractFormElement
 
                 $result = $queryBuilder
                     ->select('a.uid', 'b.lg_iso_2', 'b.lg_country_iso_2')
-                    ->from($tableA)
+                    ->from($tableA, 'a')
                     ->where('a.uid', (int)$this->contentLanguageUid)
                     ->leftJoin(
                         'a',