Sanity check send_webmentions() in class-sender.php
Closed this issue · 2 comments
shawfactor commented
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.
dshanske commented
Has that actually happened?
shawfactor commented
I see it happening all the time in my logs just after I trash then deleted
certain custom post types. I think. The plugins tries to notify other sites
that the cpt has been deleted but the cpt is no longer in the db when the
cron is processed.
Pete
…On Sat, 23 Dec 2023 at 5:04 pm, David Shanske ***@***.***> wrote:
Has that actually happened?
—
Reply to this email directly, view it on GitHub
<#447 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE55YOQRROFOOC6QKJHUNDYKZYAFAVCNFSM6AAAAABBAR6U4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGIYTOMJRG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>