[BUGFIX] Value of transOrigPointerField might be an array 68/43168/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 10 Sep 2015 10:15:11 +0000 (12:15 +0200)
committerFrans Saris <franssaris@gmail.com>
Thu, 10 Sep 2015 12:06:56 +0000 (14:06 +0200)
Resolves: #69640
Releases: master
Change-Id: I7f3af4f87ae0eb22dc8cffbba805642bdc258f44
Reviewed-on: http://review.typo3.org/43168
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
typo3/sysext/backend/Classes/Form/InlineRelatedRecordResolver.php

index 0358a45..caabc93 100644 (file)
@@ -57,7 +57,13 @@ class InlineRelatedRecordResolver {
                        } else {
                                $language = (int)$language;
                        }
-                       $transOrigPointer = (int)$row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']];
+                       if (isset($row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']])
+                               && is_array($row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']])
+                       ) {
+                               $transOrigPointer = (int)$row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']][0];
+                       } else {
+                               $transOrigPointer = (int)$row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']];
+                       }
                        $transOrigTable = BackendUtility::getOriginalTranslationTable($table);
 
                        if ($language > 0 && $transOrigPointer) {