We're running CiviCRM 5.66, WordPress 6.3.22, and PHP 8.1.
We had our hosting service (CiviHosting) upgrade us to CiviCRM 5.66.0 on Sunday. We last upgraded about a year ago. Yesterday (Wednesday) a user noticed our Membership sign-up page (a CiviCRM Contribution page) covered in what appeared to be error messages.
By way of example, here's a screen capture of the portion of the form asking for First Name;
Warning: Undefined array key "options_per_line" in /home/antietam/www/dev/wp-content/uploads/civicrm/templates_c/en_US/%%5C/5C2/5C26BC2B%%Fields.tpl.php on line 65
First Name *
Warning: Undefined array key "is_datetime_field" in /home/antietam/www/dev/wp-content/uploads/civicrm/templates_c/en_US/%%5C/5C2/5C26BC2B%%Fields.tpl.php on line 110
Warning: Undefined array key "prefix" in /home/antietam/www/dev/wp-content/uploads/civicrm/templates_c/en_US/%%5C/5C2/5C26BC2B%%Fields.tpl.php on line 145
After a little research on similar reports on StackExchange, it's clear these are actually PHP Warnings and (probably) do not actually impact the function of the form.
I could not turn off the errors/warnings by setting error_reporting in the global php.ini file to "Off" but found that reverting PHP to version 7.4 did clear them from the form.
So now we're running PHP 7.4 on our production site, which seems low risk, but is not sustainable. I recognize we have only masked the problem, not solved it.
We do not have any other Contribution Pages active on the site at the moment, but will turn one on next week to gather registrations for our next Event. That form also is crawling with these warnings in our Development environment (PHP 8.1), but is clean in production (PHP 7.4).
I've left our Dev site at PHP 8.1 if you'd like to see the problem our user saw, here: https://dev.antietaminstitute.org/become-a-member/
My uneducated guess is that there is some code in CivCRM core having to do with Contribution Pages that is incompatible with PHP8, spawning these warnings.
I do not know enough about the CiviCRM core bug list, but hope this is already on it, or could be added if it is, in fact, a previously unreported bug.
I'd be very glad for any insight, recommendations, or other feedback, and happy to answer any questions.