[BUGFIX] Check for array before using array_key_exists 30/58230/2
authorCybercraft <info@cybercraft.de>
Sat, 8 Sep 2018 13:38:46 +0000 (15:38 +0200)
committerJo Hasenau <info@cybercraft.de>
Sat, 8 Sep 2018 14:34:14 +0000 (16:34 +0200)
Change-Id: I002509f9bd300e33417d16f0c39fad63878d728e
Reviewed-on: https://review.typo3.org/58230
Reviewed-by: Jo Hasenau <info@cybercraft.de>
Tested-by: Jo Hasenau <info@cybercraft.de>
Classes/Model/L10nBaseService.php

index 6966b12..2f2fda5 100644 (file)
@@ -471,7 +471,7 @@ class L10nBaseService
                         }
                         if (is_array($data['fields'])) {
                             foreach ($data['fields'] as $key => $tData) {
-                                if (is_array($tData) && array_key_exists($key, $inputArray[$table][$elementUid])) {
+                                if (is_array($tData) && is_array($inputArray[$table][$elementUid]) && array_key_exists($key, $inputArray[$table][$elementUid])) {
                                     list($Ttable, $TuidString, $Tfield, $Tpath) = explode(':', $key);
                                     list($Tuid, $Tlang, $TdefRecord) = explode('/', $TuidString);
                                     if (!$this->createTranslationAlsoIfEmpty && $inputArray[$table][$elementUid][$key] == '' && $Tuid == 'NEW' && $Tfield !== trim($TCA[$Ttable]['ctrl']['label'])) {