diff options
author | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2025-04-02 22:23:08 +0000 |
---|---|---|
committer | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2025-04-02 22:23:08 +0000 |
commit | 8eb6456b524a9d9aa5433a88fe7649fe1906aa4d (patch) | |
tree | 2da3a6574f22d788dd2ce7478deeaca39ec6a1d6 | |
parent | 6fe810db927368df6e363a36dfcfa502dca2c011 (diff) | |
download | wordpress-8eb6456b524a9d9aa5433a88fe7649fe1906aa4d.tar.gz wordpress-8eb6456b524a9d9aa5433a88fe7649fe1906aa4d.zip |
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@60122 602fd350-edb4-49c9-b593-d223f7449a82
-rw-r--r-- | src/wp-mail.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wp-mail.php b/src/wp-mail.php index 19c449b645..3f39de4264 100644 --- a/src/wp-mail.php +++ b/src/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 ); } |