Skip to content

Commit

Permalink
Refactor null coalescing operator in field mapping
Browse files Browse the repository at this point in the history
Replaced the ternary shorthand (`?:`) with the null coalescing operator (`??`) for better readability and PHP compatibility. This ensures a cleaner handling of missing array keys or null values.
  • Loading branch information
Tastaturberuf committed Feb 28, 2025
1 parent cb368f6 commit 78eaf71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dca/tl_form_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{
if ( $arrField['type'] !== 'index' )
{
$arrFields[$arrField['name']] = $GLOBALS['TL_LANG']['tl_anystores'][$arrField['name']][0] ?: $arrField['name'];
$arrFields[$arrField['name']] = $GLOBALS['TL_LANG']['tl_anystores'][$arrField['name']][0] ?? $arrField['name'];
}
}

Expand Down

0 comments on commit 78eaf71

Please sign in to comment.