From 8f6f8098efd1ff74da806b576a33b4ba152d17b3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 4 Jan 2025 10:25:13 +0000 Subject: [PATCH] Coding Standards: Replace loose comparison in `wpmu_welcome_notification()`. Follow-up to [https://mu.trac.wordpress.org/changeset/543 mu:543]. Props debarghyabanerjee, aristath, poena, afercia, SergeyBiryukov. Fixes #62283. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59574 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ms-functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php index 5bb3cab118bee..77603313b2a2f 100644 --- a/src/wp-includes/ms-functions.php +++ b/src/wp-includes/ms-functions.php @@ -726,7 +726,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) { * unless it's the user's own username. */ if ( username_exists( $blogname ) ) { - if ( ! is_object( $user ) || ( is_object( $user ) && ( $user->user_login !== $blogname ) ) ) { + if ( ! is_object( $user ) || ( is_object( $user ) && $user->user_login !== $blogname ) ) { $errors->add( 'blogname', __( 'Sorry, that site is reserved!' ) ); } } @@ -1632,7 +1632,8 @@ function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta $switched_locale = switch_to_user_locale( $user_id ); $welcome_email = get_site_option( 'welcome_email' ); - if ( false == $welcome_email ) { + + if ( ! $welcome_email ) { /* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */ $welcome_email = __( 'Howdy USERNAME,