Problem/Motivation

When create media content with field "Remote Media URL" and leave this field as empty getting
Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\media_remote\Plugin\Validation\Constraint\MediaRemoteConstraintValidator->validate() (line 29 of modules/contrib/media_remote/src/Plugin/Validation/Constraint/MediaRemoteConstraintValidator.php).

along with from required field validation message .

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Krishna Mishra created an issue. See original summary.

krishna mishra’s picture

StatusFileSize
new713 bytes

Here is patch.

chetan 11 made their first commit to this issue’s fork.

chetan 11’s picture

Status: Active » Needs review

Check the above MR.

  • marcoscano committed 5ec79ad0 on 1.x
    Issue #3408677 by chetan 11, Krishna Mishra, marcoscano: Deprecated...
marcoscano’s picture

Status: Needs review » Fixed

Thank you both, I think the approach that casts the variable to a string is simpler and more readable.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.