If a user enters a bogus URL, like https://youtu.be/asdf, there isn't a check in place to determine whether sideloading was successful before calling set_post_thumbnail() to attempt to set the post thumbnail. Currently, if the URL 404s, wds_set_video_thumbnail_as_featured_image() returns a WP_Error object which is then passed to set_post_thumbnail(), which causes a fatal error.
If a user enters a bogus URL, like
https://youtu.be/asdf
, there isn't a check in place to determine whether sideloading was successful before callingset_post_thumbnail()
to attempt to set the post thumbnail. Currently, if the URL 404s,wds_set_video_thumbnail_as_featured_image()
returns a WP_Error object which is then passed toset_post_thumbnail()
, which causes a fatal error.