From a00fd09dcd2faebb72b258a61d60fe3e9bdb447b Mon Sep 17 00:00:00 2001
From: Joerg Kummer <typo3@enobe.de>
Date: Fri, 16 Feb 2018 19:05:16 +0100
Subject: [PATCH] [BUGFIX] Ensures call of synchronizeFieldValues with valid
 arguments

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>
---
 .../Localization/DataMapProcessor.php            | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php b/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php
index 57ed37f7bee9..56a092bfc3d3 100644
--- a/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php
+++ b/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php
@@ -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
+                );
+            }
         }
     }
 
-- 
GitLab