From d06ea932ded9335ad576539c0ece80e45cf46ddb Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 4 Apr 2025 16:36:31 +0000 Subject: [PATCH] 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 Built from https://develop.svn.wordpress.org/trunk@60129 git-svn-id: http://core.svn.wordpress.org/trunk@59465 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 ++-- wp-includes/ms-functions.php | 4 ++-- wp-includes/version.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e4967a9bd2..599a964a57 100644 --- a/wp-includes/functions.php +++ b/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/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 1f890dab69..b3fc55a6d3 100644 --- a/wp-includes/ms-functions.php +++ b/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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index e31409f970..38e2853097 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60128'; +$wp_version = '6.9-alpha-60129'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.