direct_mail
direct_mail copied to clipboard
Do not rely to $GLOBALS['LANG']
Hello,
following line breaks as $GLOBALS['LANG'] is not defined: https://github.com/kartolo/direct_mail/blob/944392cb644a7e44111aa20a5cc33c75d50985b9/Classes/SelectCategories.php#L85
I have searched for a while to find out where and when $GLOBALS['LANG'] will be defined. It is only available in backend context and in some CLI commands, but for frontend usage I found following line in TYPO3 core:
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Localization/LanguageService.php#L29-L30
So, please check if $GLOBALS['LANG'] is available first and/or initialize it on your own.
Thank you for your work
Stefan