PHP 8.1 Event Warnings
There are many warnings when using PHP 8.1.
They should probably be cleaned up at some point, since they are just clogging up the server logs.
Environment: WordPress with CiviCRM
Description: Several PHP warnings were encountered during the registration process for an event. These warnings suggest issues with undefined array keys and attempts to read properties on null values in the CiviCRM templates and extensions.
Errors Encountered:
- PHP Warning: Attempt to read property "value" on null in
wp-content/uploads/civicrm/templates_c/en_US/.../Register.tpl.php
on various lines. - PHP Warning: Undefined array key "confirm_footer_text" in
wp-content/uploads/civicrm/templates_c/en_US/.../Confirm.tpl.php
. - PHP Warning: Undefined array key "showBlocks" in
wp-content/uploads/civicrm/templates_c/en_US/.../showHide.tpl.php
. - PHP Warning: Undefined array key "hideBlocks" in the same file.
- PHP Warning: Undefined array key "elemType" in the same file.
- PHP Warning: Trying to access array offset on value of type null in
wp-content/uploads/civicrm/ext/ogp-1.4/ogp.php
. - PHP Warning: Undefined array key "lineItem", "pcpBlock", "totalTaxAmount" in
wp-content/uploads/civicrm/templates_c/en_US/.../Confirm.tpl.php
. - PHP Warning: Undefined array key 1 in
wp-content/uploads/civicrm/templates_c/en_US/.../EventInfoBlock.tpl.php
.
Referer: All warnings were encountered during the event registration process, with URLs sanitized to https://[sanitized_url].org/civicrm/event/register/...
.
Note: The specific template and extension files, along with the exact line numbers for each warning, are available upon request. The warnings suggest missing data handling in the template logic or missing initialization of expected data structures.