Closed the-ge closed 1 year ago
Hello Gabriel,
thank you for your feedback. I know, that it does not work properly in 8.2, but there are so many people out there who run a lower version than 8.2, that I had decided to do not take care about PHP 8.2. In PHP 8.1 it should work without warnings. I will add a hint on the readme file, that using 8.2 will lead to warnings at the moment. Thank you for reporting and using the module. I will update the module to be 8.2 ready, when the time is fine :-)
Best regards Jürgen
AllowDynamicProperties class added to class Tag to prevent warning on PHP 8.2 for dynamically decleared properties
All dynamic properties were replaced by a declared property. Should now work without problems in PHP 8.2 (if I have not forgotten a property to replace ;-). Corrected version is now available in the download section. Version number will be increased after more testing.
You work faster than I think :grin:
I apologize for not being specific about the issue description. In my case it was - and it still is - caused by:
AbstractCaptcha
in the constructor (Formelements/Captcha/AbstractCaptcha.php, line 43), andTextElements $topLabel
property of InputRadioMultiple, assigned in the constructor (Formelements/Inputelements/Inputs/InputRadioMultiple.php, line 37).Although I'm not sure that these are the same as the first time.
The module spawned no more notices after I defined those properties, but I didn't grok your code enough to understand what would be the better solution.
The complete properties list is:
AbstractCaptcha::$github_modified
AbstractCaptcha::$input_alertErrorText
AbstractCaptcha::$input_alertSuccessText
AbstractCaptcha::$input_appendLabel
AbstractCaptcha::$input_bgcolorchooser
AbstractCaptcha::$input_bgCustomColors
AbstractCaptcha::$input_bgnumberOfColors
AbstractCaptcha::$input_blacklist
AbstractCaptcha::$input_blurlevel
AbstractCaptcha::$input_captchaCharset
AbstractCaptcha::$input_captchaFontFamily
AbstractCaptcha::$input_captchaFonts
AbstractCaptcha::$input_captchaFontsize
AbstractCaptcha::$input_captchaHeight
AbstractCaptcha::$input_captchaLinesColor
AbstractCaptcha::$input_captchaNumberOfCharacters
AbstractCaptcha::$input_captchaNumberOfLines
AbstractCaptcha::$input_captchaTextColor
AbstractCaptcha::$input_captchaType
AbstractCaptcha::$input_captchaWidth
AbstractCaptcha::$input_charactersOffLine
AbstractCaptcha::$input_colorchooser
AbstractCaptcha::$input_dateformat
AbstractCaptcha::$input_emailTemplate
AbstractCaptcha::$input_framework
AbstractCaptcha::$input_grayscale
AbstractCaptcha::$input_html5_validation
AbstractCaptcha::$input_logFailedAttempts
AbstractCaptcha::$input_maxAttempts
AbstractCaptcha::$input_maxTime
AbstractCaptcha::$input_minTime
AbstractCaptcha::$input_numberOfColorsOfLines
AbstractCaptcha::$input_pixelatelevel
AbstractCaptcha::$input_preventIPs
AbstractCaptcha::$input_privacy
AbstractCaptcha::$input_removeCSS
AbstractCaptcha::$input_removeJS
AbstractCaptcha::$input_requiredHintPosition
AbstractCaptcha::$input_requiredText
AbstractCaptcha::$input_showasterisk
AbstractCaptcha::$input_timeformat
AbstractCaptcha::$input_useHoneypot
AbstractCaptcha::$input_useIPBan
AbstractCaptcha::$input_wrapperFormElements
AbstractCaptcha::$input_wrapperFormElementsCSSClass
AbstractCaptcha::$input_wrappers
AbstractCaptcha::$last_check
AbstractCaptcha::$toppasswords_download
InputRadioMultiple::$topLabel
You are right: There was an relict from the old version, which I haver overlooked. Please update to 2.1.20 and let me know if the warnings are gone.
Best regards
Uncaught Error: Call to a member function setText() on null in site/modules/FrontendForms/Formelements/Captcha/AbstractImageCaptcha.php:33
The error is gone after making InputRadioMultiple::$topLabel
public.
Thanks for reporting and offering the solution :-) I have made it public! I do not know why I have made it protected, but I guess I have made it out of habit...
:+1: It's good now.
Time to put your module to work :grinning:
In PHP 8.2 the creation of dynamic properties was deprecated, hence the module installation spawns lots of
notices.
Although it doesn't really matter, here are the versions: