From 24d315efb355773efbb97fdfafdc7e405baa48b5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 2 Apr 2025 22:25:26 +0000 Subject: [PATCH] Coding Standards: Check for an empty mail server URL first in `wp-mail.php`. This follows a common best practice of checking for an empty value before doing a specific comparison. Follow-up to [39772]. Props dilipbheda, mukesh27. Fixes #63219. Built from https://develop.svn.wordpress.org/trunk@60122 git-svn-id: http://core.svn.wordpress.org/trunk@59458 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-mail.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 22202ee28c..36523d2bb4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60121'; +$wp_version = '6.9-alpha-60122'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-mail.php b/wp-mail.php index 19c449b645..3f39de4264 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -17,7 +17,7 @@ if ( ! apply_filters( 'enable_post_by_email_configuration', true ) ) { $mailserver_url = get_option( 'mailserver_url' ); -if ( 'mail.example.com' === $mailserver_url || empty( $mailserver_url ) ) { +if ( empty( $mailserver_url ) || 'mail.example.com' === $mailserver_url ) { wp_die( __( 'This action has been disabled by the administrator.' ), 403 ); }