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
This commit is contained in:
Sergey Biryukov
2025-04-02 22:25:26 +00:00
parent a929a47c76
commit 24d315efb3
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@@ -17,7 +17,7 @@ if ( ! apply_filters( 'enable_post_by_email_configuration', true ) ) {
$mailserver_url = get_option( 'mailserver_url' ); $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 ); wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
} }