Skip to content

Commit e3947f5

Browse files
authored
Merge pull request #246 from web-vision/3.0-backport-241
[BUGFIX] Avoid undefined array key warning in `AllowLanguageSynchronizationHook`
2 parents f5536d5 + 46dc06c commit e3947f5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Classes/Hooks/AllowLanguageSynchronizationHook.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@ public function processDatamap_beforeStart(DataHandler $dataHandler): void
2525

2626
$columnConfig = $GLOBALS['TCA'][$table]['columns'][$column];
2727

28-
if (
29-
isset($columnConfig['config']['behaviour'])
28+
if (isset($columnConfig['config']['behaviour'])
3029
&& is_array($columnConfig['config']['behaviour'])
3130
&& isset($columnConfig['config']['behaviour']['allowLanguageSynchronization'])
3231
&& (bool)$columnConfig['config']['behaviour']['allowLanguageSynchronization'] === true
3332
) {
34-
if (isset($columnConfig['l10n_mode']) && $columnConfig['l10n_mode'] == 'prefixLangTitle') {
35-
$l10nState[$column] = 'custom';
36-
} else {
37-
$l10nState[$column] = 'parent';
38-
}
33+
$l10nState[$column] = (($columnConfig['l10n_mode'] ?? '') === 'prefixLangTitle')
34+
? 'custom'
35+
: 'parent';
3936
}
4037
}
4138
if (!empty($l10nState)) {

0 commit comments

Comments
 (0)