PHP Fatal error: Constant expression contains invalid operations... OfficeHoursItem.php on line 422

Created on 24 March 2025, 9 days ago

We're using office_hours in LocalGov Drupal Microsites.

A fresh install is now giving me the following error:

PHP Fatal error: Constant expression contains invalid operations in /var/www/html/web/modules/contrib/office_hours/src/Plugin/Field/FieldType/OfficeHoursItem.php on line 422

In fact, I'm getting the same on a fresh install of the standard profile.

Steps to reproduce.

Fresh install of Drupal 10.4.5

Enable Office Hours 8.x-1.24

Add a new field to an existing content type.

See the fatal error above.

πŸ› Bug report
Status

Active

Version

1.24

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024