diff options
author | John Blackbourn <johnbillion@git.wordpress.org> | 2025-04-04 16:34:25 +0000 |
---|---|---|
committer | John Blackbourn <johnbillion@git.wordpress.org> | 2025-04-04 16:34:25 +0000 |
commit | 1ec1c5597effbdc7d1f5589d4942120feca5cf77 (patch) | |
tree | 49223d43ab70e1ac5589113a8ebf86e3640f9892 | |
parent | 07bf0f91117629fb382ad09b6de1d138baea15e0 (diff) | |
download | wordpress-1ec1c5597effbdc7d1f5589d4942120feca5cf77.tar.gz wordpress-1ec1c5597effbdc7d1f5589d4942120feca5cf77.zip |
Administration: Don't attempt to send a notification about a change of site admin or network admin email address when the old address is empty.
Props spenserhale.
Fixes #62211
git-svn-id: https://develop.svn.wordpress.org/trunk@60129 602fd350-edb4-49c9-b593-d223f7449a82
-rw-r--r-- | src/wp-includes/functions.php | 4 | ||||
-rw-r--r-- | src/wp-includes/ms-functions.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index e4967a9bd2..599a964a57 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -8090,8 +8090,8 @@ function wp_cache_set_last_changed( $group ) { function wp_site_admin_email_change_notification( $old_email, $new_email, $option_name ) { $send = true; - // Don't send the notification to the default 'admin_email' value. - if ( 'you@example.com' === $old_email ) { + // Don't send the notification to the default 'admin_email' value or an empty value. + if ( 'you@example.com' === $old_email || empty( $old_email ) ) { $send = false; } diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php index 1f890dab69..b3fc55a6d3 100644 --- a/src/wp-includes/ms-functions.php +++ b/src/wp-includes/ms-functions.php @@ -2869,8 +2869,8 @@ All at ###SITENAME### function wp_network_admin_email_change_notification( $option_name, $new_email, $old_email, $network_id ) { $send = true; - // Don't send the notification to the default 'admin_email' value. - if ( 'you@example.com' === $old_email ) { + // Don't send the notification to the default 'admin_email' value or an empty value. + if ( 'you@example.com' === $old_email || empty( $old_email ) ) { $send = false; } |