Closed edent closed 4 months ago
Had a bunch of these pop up recently.
PHP Warning: Attempt to read property "comment_parent" on null in /wp-content/plugins/webmention/includes/class-sender.php on line 60
https://github.com/pfefferle/wordpress-webmention/blob/2d249be2690207761f3724bb8ce9492d43f1b06c/includes/class-sender.php#L60
I assume it just needs !is_null( $comment )?
!is_null( $comment )
I'm not sure which comments triggered it.
Possibly related to #342
Or ( ! empty( $comment->comment_parent ) ). But, yeah, get_comment() can return null. Question is why the comment_post hook is called with a non-existent (?) $id.
( ! empty( $comment->comment_parent ) )
get_comment()
null
comment_post
$id
Yes, that's weird!
Had a bunch of these pop up recently.
PHP Warning: Attempt to read property "comment_parent" on null in /wp-content/plugins/webmention/includes/class-sender.php on line 60
https://github.com/pfefferle/wordpress-webmention/blob/2d249be2690207761f3724bb8ce9492d43f1b06c/includes/class-sender.php#L60
I assume it just needs
!is_null( $comment )
?I'm not sure which comments triggered it.
Possibly related to #342