@@ -112,7 +112,7 @@ public function performMigration(string $list_type): bool
112
112
$ flexForm = $ this ->flexFormService ->convertFlexFormContentToArray ($ record ['pi_flexform ' ]);
113
113
114
114
if ($ list_type === 'powermail_pi2 ' ) {
115
- $ targetCType = $ this ->getTargetListType ($ flexForm ['switchableControllerActions ' ]);
115
+ $ targetCType = $ this ->getTargetListType ($ flexForm ['switchableControllerActions ' ] ?? '' );
116
116
$ allowedSettings = $ this ->getAllowedSettingsFromFlexForm ($ targetCType );
117
117
foreach ($ flexFormData ['data ' ] as $ sheetKey => $ sheetData ) {
118
118
foreach ($ sheetData ['lDEF ' ] as $ settingName => $ setting ) {
@@ -138,7 +138,7 @@ public function performMigration(string $list_type): bool
138
138
}
139
139
140
140
// Remove flexform data which do not exist in flexform of new plugin
141
- $ this ->updateContentElement ($ record ['uid ' ], $ targetCType , $ newFlexform );
141
+ $ this ->updateContentElement ($ record ['uid ' ], $ targetCType , ( string ) $ newFlexform );
142
142
}
143
143
144
144
return true ;
@@ -181,7 +181,10 @@ protected function getTargetListType(string $switchableControllerActions): strin
181
181
182
182
protected function getAllowedSettingsFromFlexForm (string $ listType ): array
183
183
{
184
- $ flexFormFile = $ GLOBALS ['TCA ' ]['tt_content ' ]['columns ' ]['pi_flexform ' ]['config ' ]['ds ' ]['*, ' . $ listType ];
184
+ $ flexFormFile = $ GLOBALS ['TCA ' ]['tt_content ' ]['columns ' ]['pi_flexform ' ]['config ' ]['ds ' ]['*, ' . $ listType ] ?? null ;
185
+ if (!$ flexFormFile ) {
186
+ return [];
187
+ }
185
188
$ flexFormContent = file_get_contents (GeneralUtility::getFileAbsFileName (substr (trim ($ flexFormFile ), 5 )));
186
189
$ flexFormData = GeneralUtility::xml2array ($ flexFormContent );
187
190
0 commit comments