WordPress.org

Make WordPress Core

Changeset 32838


Ignore:
Timestamp:
06/18/2015 01:29:41 PM (3 years ago)
Author:
boonebgorges
Message:

When updating a user, only send email-change notification if email address is passed.

The notification, introduced in [32380], was firing incorrectly (and throwing
a PHP notice) when wp_update_user() was called without including 'user_email'
in the update data.

Props imath.
Fixes #32684. See #32430.

File:
1 edited

Legend:

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

    r32820 r32838  
    21592159    }
    21602160
    2161     if ( $user['user_email'] !== $userdata['user_email'] ) {
     2161    if ( isset( $userdata['user_email'] ) && $user['user_email'] !== $userdata['user_email'] ) {
    21622162        /**
    21632163         * Filter to stop the sending of the email change email.
Note: See TracChangeset for help on using the changeset viewer.