diff --git a/src/wp-admin/includes/class-wp-automatic-updater.php b/src/wp-admin/includes/class-wp-automatic-updater.php index 6b027fb177f6..1f392fe951f8 100644 --- a/src/wp-admin/includes/class-wp-automatic-updater.php +++ b/src/wp-admin/includes/class-wp-automatic-updater.php @@ -254,7 +254,10 @@ protected function send_core_update_notification_email( $item ) { $notified = get_site_option( 'auto_core_update_notified' ); // Don't notify if we've already notified the same email address of the same version. - if ( $notified && get_site_option( 'admin_email' ) === $notified['email'] && $notified['version'] == $item->current ) { + if ( $notified + && get_site_option( 'admin_email' ) === $notified['email'] + && $notified['version'] == $item->current + ) { return false; } @@ -624,9 +627,14 @@ protected function after_core_update( $update_result ) { $send = false; } - $n = get_site_option( 'auto_core_update_notified' ); + $notified = get_site_option( 'auto_core_update_notified' ); + // Don't notify if we've already notified the same email address of the same version of the same notification type. - if ( $n && 'fail' === $n['type'] && get_site_option( 'admin_email' ) === $n['email'] && $n['version'] == $core_update->current ) { + if ( $notified + && 'fail' === $notified['type'] + && get_site_option( 'admin_email' ) === $notified['email'] + && $notified['version'] == $core_update->current + ) { $send = false; }