Index: src/bp-xprofile/bp-xprofile-functions.php
--- src/bp-xprofile/bp-xprofile-functions.php
+++ src/bp-xprofile/bp-xprofile-functions.php
@@ -1302,7 +1302,7 @@
 		$levels = (array)$levels;
 	}

-	$user_visibility_levels = bp_get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true );
+	$user_visibility_levels = (array) bp_get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true );

 	// Parse the user-provided visibility levels with the default levels, which may take
 	// precedence.
