Skip to content

Commit f3bee16

Browse files
Check comment object returned before using
1 parent 25f0b56 commit f3bee16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@ function wp_new_comment_notify_moderator( $comment_id ) {
24252425
*/
24262426
function wp_new_comment_notify_postauthor( $comment_id ) {
24272427
$comment = get_comment( $comment_id );
2428-
$isNote = ( 'note' === $comment->comment_type );
2428+
$isNote = ( $comment && 'note' === $comment->comment_type );
24292429

24302430
$maybe_notify = $isNote ? get_option( 'notes_notify' ) : get_option( 'comments_notify' );
24312431

0 commit comments

Comments
 (0)