Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated

Created on 26 April 2022, about 2 years ago
Updated 6 September 2023, 10 months ago

Problem/Motivation

Deprecated function: explode(): Passing null to parameter #2 ($string) of type string is deprecated in Drupal\media_library_form_element\Element\MediaLibrary::processMediaLibrary() (line 65 of modules/contrib/media_library_form_element/src/Element/MediaLibrary.php)

Steps to reproduce

Proposed resolution

Patch processMediaLibrary() by null-coalescing the explode() argument to an empty string

$entity_ids = array_filter(explode(',', $default_value ?? ''));

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇳🇮Nicaragua Ada Hernandez Leon

Live updates comments and jobs are added and updated live.
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.69.0 2024