Make WordPress Core


Ignore:
Timestamp:
06/04/2015 05:28:07 PM (9 years ago)
Author:
boonebgorges
Message:

In wp_notify_moderator(), don't throw notice when comment belongs to a post with no author.

Props Oxymoron.
Fixes #32566.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r32614 r32692  
    15511551    // Send to the administration and to the post author if the author can modify the comment.
    15521552    $emails = array( get_option( 'admin_email' ) );
    1553     if ( user_can( $user->ID, 'edit_comment', $comment_id ) && ! empty( $user->user_email ) ) {
     1553    if ( $user && user_can( $user->ID, 'edit_comment', $comment_id ) && ! empty( $user->user_email ) ) {
    15541554        if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) )
    15551555            $emails[] = $user->user_email;
Note: See TracChangeset for help on using the changeset viewer.