Skip to content

Commit

Permalink
[BUGFIX] Check if languageField isset
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasNilsson committed Nov 30, 2023
1 parent 49cca38 commit 8f7df5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Classes/Xclass/Form/Container/FilesControlContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ protected function getExtensionConfigurationManager(): ExtensionConfigurationMan
/** @var ExtensionConfigurationManager $extensionConfigurationManager */
$extensionConfigurationManager = GeneralUtility::makeInstance(ExtensionConfigurationManager::class);

$languageField = $GLOBALS['TCA'][$this->data['tableName']]['ctrl']['languageField'];

$languageId = -1;
if (isset($GLOBALS['TCA'][$this->data['tableName']]['ctrl']['languageField'])) {
$languageField = $GLOBALS['TCA'][$this->data['tableName']]['ctrl']['languageField'];
}

if ($languageField) {
$languageId = (int)$this->data['databaseRow'][$languageField];
}
Expand Down

0 comments on commit 8f7df5c

Please sign in to comment.