[BUGFIX] Prevent catchable error during workspace publishing 55/54855/2
authorBenni Mack <benni@typo3.org>
Wed, 29 Nov 2017 09:50:58 +0000 (10:50 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Wed, 29 Nov 2017 11:33:00 +0000 (12:33 +0100)
When publishing a workspace, incorrect TCA might lead to a catchable
fatal error. This happened, when TCA for a field did not contain a
config-entry.

Resolves: #77619
Releases: master, 8.7, 7.6
Change-Id: I81a3b727320ee984908c964d0729551c4c264f8d
Reviewed-on: https://review.typo3.org/54855
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/version/Classes/Hook/DataHandlerHook.php

index 3c18264..b611d10 100644 (file)
@@ -909,7 +909,9 @@ class DataHandlerHook
         // Take care of relations in each field (e.g. IRRE):
         if (is_array($GLOBALS['TCA'][$table]['columns'])) {
             foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $fieldConf) {
-                $this->version_swap_processFields($table, $field, $fieldConf['config'], $curVersion, $swapVersion, $tcemainObj);
+                if (isset($fieldConf['config']) && is_array($fieldConf['config'])) {
+                    $this->version_swap_processFields($table, $field, $fieldConf['config'], $curVersion, $swapVersion, $tcemainObj);
+                }
             }
         }
         unset($swapVersion['uid']);