Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292566

Null is passed to trim() in TermForm::buildEntity() when using an ajax operation without entering a term name

$
0
0

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

Wrap $term->setName(trim($term->getName())); in an if ($term->getName() !== NULL) {

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 292566

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>