Problem/Motivation
I get the gollowing error when viewing an entity using this formatter
Deprecated function: mb_strlen(): Passing null to parameter #1 ($string) of type string is deprecated in template_preprocess_image_formatter_link_to_image_style_formatter() (line 40 of modules/contrib/image_formatter_link_to_image_style/image_formatter_link_to_image_style.field.inc).
Steps to reproduce
In my particular case this is happening when I have an image field on a media entity, then upload and save image media entities with entity_browser.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | image-issue-3374852-1.patch | 580 bytes | kapil-s |
| #2 | issue-3374852-1.patch | 580 bytes | loze |
Issue fork image_formatter_link_to_image_style-3374852
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
Comment #2
loze commentedhere is a small patch that gets rid of the error
Comment #3
kapil-s commentedthis is a small patch that gets rid of the error
Comment #6
keshavv commented@kapil-virasat
Please always attach an interdiff of the patch.
Sorry to say' But you just created a duplicate patch of the existing one. Which is not correct.
Please do a meaningful contribution. Otherwise, it will be a waste of time.
Thank you!
Comment #7
keshavv commentedThe #2 patch working well, Made a little change to it and created the MR.
Please review.
Thank you.
Comment #8
loze commentedMR2 works well for me. Its a simple enough change, marking as RTBC to help move it along.
Comment #10
facine commentedFixed! Thanks