diff --git a/wp-includes/user.php b/wp-includes/user.php index 9d256c2612..4c43daa4ef 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -696,7 +696,7 @@ function get_blogs_of_user( $user_id, $all = false ) { foreach ( $keys as $key ) { if ( 'capabilities' !== substr( $key, -12 ) ) continue; - if ( 0 !== strpos( $key, $wpdb->base_prefix ) ) + if ( $wpdb->base_prefix && 0 !== strpos( $key, $wpdb->base_prefix ) ) continue; $blog_id = str_replace( array( $wpdb->base_prefix, '_capabilities' ), '', $key ); if ( ! is_numeric( $blog_id ) )