Deprecated function: pathinfo(): Passing null to parameter #1 ($path) of type string is deprecated

Created on 12 August 2024, 3 months ago

Problem/Motivation

This issue arose for me when trying to save a media item with no values for a remote image. We get the following error:

Deprecated function: pathinfo(): Passing null to parameter #1 ($path) of type string is deprecated in Drupal\media_entity_remote_image\Plugin\Validation\Constraint\RemoteImageUrlConstraintValidator->validate() (line 28 of modules/contrib/media_entity_remote_image/src/Plugin/Validation/Constraint/RemoteImageUrlConstraintValidator.php).

Steps to reproduce

Create a media item with a remote image field and try to save the media item. This error should be thrown as the php function pathinfo now requires a non-null value as argument #1

Proposed resolution

Patch attached

πŸ› Bug report
Status

Needs review

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States peachez

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024