[BUGFIX] Ensures call of synchronizeFieldValues with valid arguments 58/55758/3
authorJoerg Kummer <typo3@enobe.de>
Fri, 16 Feb 2018 18:05:16 +0000 (19:05 +0100)
committerBenni Mack <benni@typo3.org>
Tue, 20 Feb 2018 14:29:07 +0000 (15:29 +0100)
Let 8.7 installtool upgrade wizard L10nModeUpdater ignore synchronization if parent entry of given translations is set to deleted

Resolves: #83940
Releases: master, 8.7
Change-Id: Ie240f71ecf42564c0547abd2dfa5c5efb23c6385
Reviewed-on: https://review.typo3.org/55758
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Joerg Kummer <typo3@enobe.de>
Tested-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Michael Semle <michael.semle@b13.de>
Tested-by: Michael Semle <michael.semle@b13.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php

index 57ed37f..56a092b 100644 (file)
@@ -325,13 +325,15 @@ class DataMapProcessor
             );
         }
 
-        foreach ($fieldNames as $fieldName) {
-            $this->synchronizeFieldValues(
-                $item,
-                $fieldName,
-                $fromRecord,
-                $forRecord
-            );
+        if (is_array($fromRecord) && is_array($forRecord)) {
+            foreach ($fieldNames as $fieldName) {
+                $this->synchronizeFieldValues(
+                    $item,
+                    $fieldName,
+                    $fromRecord,
+                    $forRecord
+                );
+            }
         }
     }