We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c67de29 commit cdf5068Copy full SHA for cdf5068
src/wp-includes/comment.php
@@ -2466,7 +2466,7 @@ function wp_new_comment_notify_postauthor( $comment_id ) {
2466
* @param WP_Comment $comment The comment object.
2467
*/
2468
function wp_new_comment_via_rest_notify_postauthor( $comment ) {
2469
- if ( 'note' === $comment->comment_type ) {
+ if ( $comment instanceof WP_Comment && 'note' === $comment->comment_type ) {
2470
wp_new_comment_notify_postauthor( (int) $comment->comment_ID );
2471
}
2472
0 commit comments