thomasrawiel / powermailcaptcha

GNU General Public License v3.0
4 stars 4 forks source link

Exception in BE after installation with PHP 8.1 #4

Closed sypets closed 1 year ago

sypets commented 1 year ago
#1476107295 TYPO3\CMS\Core\Error\Exception

PHP Warning: Undefined array key "label" 
in /var/www/site-uol11/htdocs/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
line 847

Reason for error

missing "label" for option captchaMethod (in combination with PHP 8.1):

ext_typoscript_constants.txt

# cat=powermailcaptcha//0020; type=options [Google Recaptcha=recaptcha,Friendly Captcha=friendlycaptcha,hCaptcha=hcaptcha]
    captchaMethod = recaptcha

code

Exception is thrown in:

In core/Classes/TypoScript/ExtendedTemplateService.php line 847 $label = $this->getLanguageService()->sL($params['label']);

values (via Debugger)

no label

Reproduce

  1. Install extension: composer require traw/powermailcaptcha

  2. extension:setup cache:flush etc.

  3. Go to Template module, constant editor

Exception occurs.

Versions

thomasrawiel commented 1 year ago

Thanks for your report and PR. The change has been published as Version 1.0.5