Warning message when creating a new field

Created on 1 July 2024, 3 months ago
Updated 30 July 2024, about 2 months ago

Problem/Motivation

Creating a new yearonly field yields:

Warning: range(): Argument #1 ($start) must not be empty, casted to 0 in Drupal\yearonly\Plugin\Field\FieldWidget\YearOnlyDefaultWidget->formElement() (line 71 of modules/contrib/yearonly/src/Plugin/Field/FieldWidget/YearOnlyDefaultWidget.php).

Steps to reproduce

- Add a new yearonly field to an entity

Proposed resolution

Initialize blank ("") field settings to 0 in YearOnlyDefaultWidget.php.

Remaining tasks

  • Code
  • Test
  • Merge

User interface changes

None

API changes

None

Data model changes

?

πŸ› Bug report
Status

Fixed

Version

9.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States justcaldwell

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