Fix \Drupal\taxonomy\Entity\Term::getName() to conform to the interface

Created on 26 April 2022, over 2 years ago
Updated 14 November 2023, about 1 year ago

Problem/Motivation

Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\taxonomy\TermForm->buildEntity()

Steps to reproduce

1. Add a field that uses ajax in its widget to a vocabulary (for example file/image or a field with unlimited cardinality)
2. Go to the add term form
3. Trigger an ajax operation without entering a term name

Proposed resolution

Change \Drupal\taxonomy\Entity\Term::getName to conform to the interface and always return a string.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.1

Component
Taxonomy 

Last updated 20 minutes ago

  • Maintained by
  • 🇺🇸United States @xjm
  • 🇬🇧United Kingdom @catch
Created by

🇨🇭Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024