pfefferle/wordpress-webmention

Sanity check send_webmentions() in class-sender.php

Closed this issue · 2 comments

I'd suggest a sanity check that the post still exists in the function, something like:

if ( FALSE === get_post_status( $post_id ) ) {
// The post no longer exists so lets early return
return;
}

This is because if the post ceases to exist in the interim (e'g. between the publish and sending) a fatal error is generated.

Has that actually happened?