Closed mrmadhat closed 1 year ago
Hi @mrmadhat, thanks for this!
I was able to reproduce this for the ResponsivePics::get_picture
calls only when $intrinsic
is true. I applied a fix on version 1.7.3 I just released. Could you verify this is working correctly now?
In development you should see an error message now instead:
<pre class="responsive-pics-error"><h6>ResponsivePics errors</h6><ul><li>url does not exist for id {image_id}</li></ul></pre>
Describe the bug An error occurs when an image is deleted from the media library but still remains as a field used for selection.
To Reproduce Steps to reproduce the behavior:
Undefined array key "mimetype"
Expected behavior When the image has been deleted from the media library and as a result doesn't have a valid mimetype the site should still work. I also think it would be good to put a comment in the html that lets the dev know why the image isn't being output.
I think making use of
wp_attachment_is_image
could be part of the solution but haven't had chance to dig into the code so would need to be confirmed.Screenshots
Software (please complete the following information):