Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined global variable $LANG #20

Open
stefwer opened this issue Jun 13, 2024 · 0 comments
Open

Undefined global variable $LANG #20

stefwer opened this issue Jun 13, 2024 · 0 comments

Comments

@stefwer
Copy link

stefwer commented Jun 13, 2024

PHP 8.2.18
TYPO3 11.5.38

The Log gets spammed by Core: Error handler (FE): PHP Warning: Undefined global variable $LANG in ......../typo3conf/ext/friendlycaptcha_official/Classes/FieldValidator/PowermailValidator.php line 81

could not really debug, because it's the localized error message for bots
possible solution:

return $GLOBALS['LANG'] ?? GeneralUtility::makeInstance(LanguageService::class);

or

$result->addError(
      $this->translateErrorMessage('message.invalid', 'friendlycaptcha_official'),
      1689236324
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant