CAPTCHA errors in modx log

Hi all. One of my clients, who hosts with IONOS, got some errors with CAPTCHA (from the RECAPTCHA extra) that show up in the error log. Some of these errors look like this:

3) PHP warning: Undefined variable $action
4) PHP warning: Undefined variable $error

or

PHP warning: foreach() argument must be of type array|object, null given
Data Google API ERRORS:

however no error messages besides that first one get displayed.

Any ideas? MODX 3.1.1, PHP 8.4

What extra exactly? ReCaptchaV2? What version?


These warnings are probably harmless. Since PHP 8 more warnings get generated when the code isn’t “cleanly” coded.

It would also be helpful if you could post the whole line of the error log, that includes the file path and the line number where the problem occured.