mirror of
https://github.com/WordPress/WordPress.git
synced 2024-06-25 06:14:58 +02:00
In wp_notify_moderator()
, don't throw notice when comment belongs to a post with no author.
Props Oxymoron. Fixes #32566. Built from https://develop.svn.wordpress.org/trunk@32692 git-svn-id: http://core.svn.wordpress.org/trunk@32662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0e77b693ac
commit
f88996bed7
|
@ -1550,7 +1550,7 @@ function wp_notify_moderator($comment_id) {
|
|||
$user = get_userdata( $post->post_author );
|
||||
// Send to the administration and to the post author if the author can modify the comment.
|
||||
$emails = array( get_option( 'admin_email' ) );
|
||||
if ( user_can( $user->ID, 'edit_comment', $comment_id ) && ! empty( $user->user_email ) ) {
|
||||
if ( $user && user_can( $user->ID, 'edit_comment', $comment_id ) && ! empty( $user->user_email ) ) {
|
||||
if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) )
|
||||
$emails[] = $user->user_email;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-alpha-32691';
|
||||
$wp_version = '4.3-alpha-32692';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue
Block a user