[BUGFIX] Ensures call of synchronizeFieldValues with valid arguments 25/55825/2
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 15:28:39 +0000 (16:28 +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/55825
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/Localization/DataMapProcessor.php

index 992fc08..256b093 100644 (file)
@@ -339,13 +339,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
+                );
+            }
         }
     }