Duplicate declaration of static variable under PHP 8.3
Overview
Please describe your problem or bug in detail.
If you have already posted on https://civicrm.stackexchange.com or https://chat.civicrm.org, please include the link to that conversation.
Reproduction steps
- Go to the web site.
- The site crashes with
PHP Fatal error: Duplicate declaration of static variable $fields in <drupal root>/vendor/civicrm/civicrm-core/CRM/Mailing/Event/BAO/MailingEventForward.php on line 236
Current behaviour
PHP Fatal error: Duplicate declaration of static variable $fields in <drupal root>/vendor/civicrm/civicrm-core/CRM/Mailing/Event/BAO/MailingEventForward.php on line 236
Once the static declaration has been removed, you get.
PHP Fatal error: Duplicate declaration of static variable $fields in <D:\CiviCRM_Custom.git\drupal8>drupal root>/vendor/civicrm/civicrm-core/CRM/Import/Parser.php on line 1131
Expected behaviour
The home page should appear.
Environment information
- Browser: MS Edge but probably not relevant
- CiviCRM: Master/5.68.x...
- PHP: 8.3 and I suspect very relevant.
- CMS: Drupal 10.2.0 but may not be relevant
- Database: MySQL 8.0.35 but probably not relevant.
- Web Server: IIS 10 but probably not relevant.
Comments
Cannot reproduce in Demo as it is running PHP 8.1.x. Drupal now wants at least 8.2 if my understanding is correct.