Project

General

Profile

Bug #85531

Updated by Mathias Brodala over 6 years ago

When editing a translated record which contains a @group@ @db@ field whose @l10n_display@ is configured as @defaultAsReadonly@ an exception occurs: 

 <pre> 
 #1476107295: PHP Warning: Invalid argument supplied for foreach() in /.../typo3/sysext/backend/Classes/Form/Element/GroupElement.php line 158 (More information) 

 TYPO3\CMS\Core\Error\Exception thrown in file 
 /.../typo3/sysext/core/Classes/Error/ErrorHandler.php in line 107. 

 17 TYPO3\CMS\Core\Error\ErrorHandler::handleError(2, "Invalid argument supplied for foreach()", "/.../typo3/sysext/backend/Classes/Form/Element/GroupElement.php", 158, array) 

 /.../typo3/sysext/backend/Classes/Form/Element/GroupElement.php: 
 00156:               } 
 00157:           } elseif ($internalType === 'db') { 
 00158:               foreach ($selectedItems as $selectedItem) { 
 00159:                   $tableWithUid = $selectedItem['table'] . '_' . $selectedItem['uid']; 
 00160:                   $listOfSelectedValues[] = $tableWithUid; 
 </pre> 

 The code here expects an array but gets an integer (number of related records) instead. 

 This is triggered by the @SingleFieldContainer@ which replaces the @databaseRow@ value prepared by @TcaGroup@ with the raw value from @defaultLanguageRow@ in case @l10n_display@ is set to @defaultAsReadonly@.

Back