Skip to content

Commit 1ec1c55

Browse files
committed
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
1 parent 07bf0f9 commit 1ec1c55

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/wp-includes/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8090,8 +8090,8 @@ function wp_cache_set_last_changed( $group ) {
80908090
function wp_site_admin_email_change_notification( $old_email, $new_email, $option_name ) {
80918091
$send = true;
80928092

8093-
// Don't send the notification to the default 'admin_email' value.
8094-
if ( '[email protected]' === $old_email ) {
8093+
// Don't send the notification to the default 'admin_email' value or an empty value.
8094+
if ( '[email protected]' === $old_email || empty( $old_email ) ) {
80958095
$send = false;
80968096
}
80978097

src/wp-includes/ms-functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,8 +2869,8 @@ function update_network_option_new_admin_email( $old_value, $value ) {
28692869
function wp_network_admin_email_change_notification( $option_name, $new_email, $old_email, $network_id ) {
28702870
$send = true;
28712871

2872-
// Don't send the notification to the default 'admin_email' value.
2873-
if ( '[email protected]' === $old_email ) {
2872+
// Don't send the notification to the default 'admin_email' value or an empty value.
2873+
if ( '[email protected]' === $old_email || empty( $old_email ) ) {
28742874
$send = false;
28752875
}
28762876

0 commit comments

Comments
 (0)