Skip to content

Commit 8eb6456

Browse files
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
1 parent 6fe810d commit 8eb6456

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-mail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
$mailserver_url = get_option( 'mailserver_url' );
1919

20-
if ( 'mail.example.com' === $mailserver_url || empty( $mailserver_url ) ) {
20+
if ( empty( $mailserver_url ) || 'mail.example.com' === $mailserver_url ) {
2121
wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
2222
}
2323

0 commit comments

Comments
 (0)