Missing argument 2 for membershippublic::check_for_posts_existance()

I am running Wordpress 3 (Not multisite).

At the top of my website's homepage, I have the following error in the source code above <!DOCTYPE html:


<b>Warning</b>: Missing argument 2 for membershippublic::check_for_posts_existance() in <b>/var/home/websites/domain.com/www/wp-content/plugins/membership/membershipincludes/classes/membershippublic.php</b> on line <b>525</b>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

And membershippublic.php line 525 to 539 says:

function check_for_posts_existance($posts, $wp_query) {
global $bp;
if(!empty($bp)) {
// BuddyPress exists so we have to handle "pretend" pages.
$thepage = substr($wp_query->query['pagename'], 0 , strpos($wp_query->query['pagename'], '/'));
if(empty($thepage)) $thepage = $wp_query->query['pagename'];
$bppages = apply_filters('membership_buddypress_pages', (array) $bp->root_components );
if(in_array($thepage, $bppages)) {
return $posts;
}
}

NOTE: The error does not appear when I visit the website while logged into the Wordpress admin. It only appears when non-Wordpress users visit the website.

Please advise!