PHP 8.1 cause error in ExplodedListField

Created on 20 January 2023, almost 2 years ago
Updated 26 April 2023, over 1 year ago

Problem/Motivation

When I try to use Legal on PHP 8.1 site, I get error: Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in Drupal\legal\Plugin\views\field\ExplodedListField->render() (line 21 of modules/contrib/legal/src/Plugin/views/field/ExplodedListField.php).

Steps to reproduce

Use Legal and open /admin/config/people/legal/terms_history page.

Proposed resolution

Patch is trivial, attached.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡·πŸ‡ΊRussia Andrew Answer Novosibirsk

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