I was using MU 2.6 with Buddypress Beta 1 and my site worked smoothly and perfectly. I upgraded to MU 2.7 and Buddypress Beta 2 and now if you try to create a new user account you get this error:
Warning: Invalid argument supplied for foreach() in /home/exbriefc/public_html/wp-content/mu-plugins/bp-xprofile/bp-xprofile-signup.php on line 104
Here is the crazy part and why I cant seem to debug this thing without some help.... This only happens when using a Kubrick theme I modified a little. If I use the default theme its fine.....
Additionally with the default theme (the one where it works) on wp-signup.php there is the field for "Full Name", but in the custom theme if you go to wp-signup.php this field is missing....how can that be considering that file is not even in the theme and should not be affected, its in MU core files? I am totally confused now.
Any ideas?
I have narrowed it down to this piece of code in my header.php file. When I remove it all is good. How can I modify this to work properly, it is essential to the operation of the site. worked fine with mu 2.6.
text in BOLD is the offending code. The rest is to show placement.
<body>
<div id="page">
<div id="header" onclick="location.href='http://ex-brief.com/';" style="cursor: pointer;">
<div id="headerimg">
<h1>
<?php
$stats = get_sitestats();
echo "".$stats[ 'users' ]." Members";
?>
<?php
$username="*********";
$password="*********";
$database="*********";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$result = mysql_query("SELECT * FROM contacts");
$num_rows = mysql_num_rows($result);
echo $num_rows;
mysql_close();
?>
ExBriefs
</h1>
<div class="description"><?php bloginfo('description'); ?></div>
</div>