Skip to content

Commit 1cc6b8e

Browse files
committed
code quality: replace unnecessary is_object() with property_exists() in wpmu_validate_blog_signup()
1 parent c1cf8a8 commit 1cc6b8e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/ms-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
730730
* unless it's the user's own username.
731731
*/
732732
if ( username_exists( $blogname ) ) {
733-
if ( ! is_object( $user ) || ( is_object( $user ) && $user->user_login !== $blogname ) ) {
733+
if ( ! is_object( $user ) || ( property_exists( $user, 'user_login' ) && $user->user_login !== $blogname ) ) {
734734
$errors->add( 'blogname', __( 'Sorry, that site is reserved!' ) );
735735
}
736736
}

0 commit comments

Comments
 (0)