[BUGFIX] Avoid exception of renderType selectCheckBox in workspace 84/57484/4
authorAlexey Atsyn <alexey.atsyn@gmail.com>
Fri, 6 Jul 2018 14:03:50 +0000 (19:03 +0500)
committerBenni Mack <benni@typo3.org>
Fri, 26 Oct 2018 13:53:09 +0000 (15:53 +0200)
Resolves: #85109
Releases: master, 8.7
Change-Id: I34a269ec2d564a546d4dc2036a97eb1027d2352f
Reviewed-on: https://review.typo3.org/57484
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index cdfff01..6afc309 100644 (file)
@@ -6531,7 +6531,7 @@ class DataHandler implements LoggerAwareInterface
                 $fieldConf = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
                 if ($registerDBList[$table][$id][$field] && ($foreignTable = $fieldConf['foreign_table'])) {
                     $newValueArray = [];
-                    $origValueArray = explode(',', $value);
+                    $origValueArray = is_array($value) ? $value : explode(',', $value);
                     // Update the uids of the copied records, but also take care about new records:
                     foreach ($origValueArray as $childId) {
                         $newValueArray[] = $this->autoVersionIdMap[$foreignTable][$childId] ? $this->autoVersionIdMap[$foreignTable][$childId] : $childId;