Warning: Undefined array key "hour" in Drupal\office_hours\Element\OfficeHoursDatelist when changing 'Time element type'

Created on 17 January 2025, 19 days ago

Problem/Motivation

When I change the field setting from HTML5 into Select List, I get the following error, presumable from the (hidden) default value widget:
Warning: Undefined array key "hour" in Drupal\office_hours\Element\OfficeHoursDatelist::valueCallback() (line 52 of ...\office_hours\src\Element\OfficeHoursDatelist.php)

Steps to reproduce

Open field settings;
Toggle "Time element type" from HTML5 to SelectList and back;
Check 'Recent log messages' in admin/reports/dblog

🐛 Bug report
Status

Active

Version

1.21

Component

Code - widget

Created by

🇳🇱Netherlands johnv

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

Comments & Activities

Production build 0.71.5 2024