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).

error

Patch attached

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mschudders’s picture

patch following coding standards added

Mschudders’s picture

Mschudders’s picture

Mschudders’s picture

Mschudders’s picture

johnv’s picture

Title: Undefined offset: 0 in Drupal\office_hours\Plugin\Field\FieldWidget\OfficeHoursWidget->errorElement » Undefined offset: 0 in OfficeHoursWidget->errorElement
Priority: Major » Normal
Status: Needs review » Fixed

I 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.

  • johnv committed f75ab01 on 8.x-1.x authored by Mschudders
    Issue #2485407 by Mschudders:  Undefined offset: 0 in OfficeHoursWidget...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.