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
This commit is contained in:
John Blackbourn
2025-04-04 16:36:31 +00:00
parent f54720e6e5
commit d06ea932de
3 changed files with 5 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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.