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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3408677-Deprecated_function_trim.patch | 713 bytes | krishna mishra |
Issue fork media_remote-3408677
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:
- 3408677-deprecated-function-trim
changes, plain diff MR !14
Comments
Comment #2
krishna mishra commentedHere is patch.
Comment #5
chetan 11 commentedCheck the above MR.
Comment #7
marcoscanoThank you both, I think the approach that casts the variable to a string is simpler and more readable.