TypeError on EntityForm with with max length widget with an empty allowed settings

Created on 9 June 2025, about 1 month ago

Problem/Motivation

On Drupal 11.2, if allowed settings is empty maxlength_field_widget_third_party_settings_form will return null which causes a type error when PHP tries to add it to an array

Steps to reproduce

On a new site install try to access the entity form on a newly created taxonomy.

Proposed resolution

Return an empty array as a fallback.

Remaining tasks

  • ❌ Get maintainer approval for the proposed resolution
  • ❌ Implement resolution
  • ❌ Write test coverage (contact a maintainer if you need help)
  • ❌ Maintainer review via the UI
  • ❌ Maintainer Code Review #1
  • ❌ Maintainer code review #2
  • ❌ Merge into dev branch, with credit to author and participants

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

🇬🇧United Kingdom aurora-norris

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