undefined array keys in CustomFieldStringLong

Created on 21 July 2025, 11 days ago

Problem/Motivation

On my production site, I'm seeing PHP warnings like this:

Warning: Undefined array key "data" in Drupal\custom_field\Plugin\DataType\CustomFieldStringLong->getFormat() (line 72 of /[path]/custom_field/src/Plugin/DataType/CustomFieldStringLong.php)

Warning: Undefined array key "formatted" in Drupal\custom_field\Plugin\DataType\CustomFieldStringLong->getFormat() (line 75 of /[path]/custom_field/src/Plugin/DataType/CustomFieldStringLong.php)

I haven't been able to reproduce the problem on a local environment.

Steps to reproduce

Unknown.

Proposed resolution

Add sanity checks and default values to these array keys.

Remaining tasks

Make a MR.

πŸ› Bug report
Status

Active

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States BenStallings

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