Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When you receive.
Notice: Undefined offset: 0 in Drupal\office_hours\Plugin\Field\FieldWidget\OfficeHoursWidget->errorElement() (line 264 of profiles/hungry_kickstart/modules/contrib/office_hours/src/Plugin/Field/FieldWidget/OfficeHoursWidget.php).
Patch attached
Comment | File | Size | Author |
---|---|---|---|
#5 | OfficeHours-2485407-3-patch_error_element_fail_because_empty_error.patch | 574 bytes | Mschudders |
error.png | 84.97 KB | Mschudders |
Comments
Comment #1
Mschudders CreditAttribution: Mschudders commentedpatch following coding standards added
Comment #2
Mschudders CreditAttribution: Mschudders at Randstad Digital commentedComment #3
Mschudders CreditAttribution: Mschudders at Randstad Digital commentedComment #4
Mschudders CreditAttribution: Mschudders at Randstad Digital commentedComment #5
Mschudders CreditAttribution: Mschudders at Randstad Digital commentedComment #6
johnvI could not replicate this error, since it is not possible to enter an invalid value in the widget.
Nonetheless, your patch reverts the function to its superclass, so I removed the function completely.
Committed with attribution.