[BUGFIX] Avoid exception of renderType selectCheckBox in workspace 14/58714/2
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 14:03:53 +0000 (16:03 +0200)
Resolves: #85109
Releases: master, 8.7
Change-Id: I34a269ec2d564a546d4dc2036a97eb1027d2352f
Reviewed-on: https://review.typo3.org/58714
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 8e7c914..2277400 100644 (file)
@@ -6465,7 +6465,7 @@ class DataHandler
                 $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;