Support Forum
First of all - we relaunched our site tonight - so far everything has been great
First time ever on simple:press, after converting from phpbb3 - OMG what a difference! And SO much better with simple:press. I have to give a big THANK YOU to everyone who has made simple:press - it really is simple. And moderating / administrating is just awesome!
And thank you for all your help so far mr. papa
But there are always something, isn't it?
When we open up the friends / adversaries list i get this (on the friends tab, NOT on the adversaries-list):
Warning: Invalid argument supplied for foreach() in /public_html/mydomain/wp-content/sp-resources/forum-plugins/private-messaging/forms/sp-pm-buddies-form.php on line 41
When pressing a users PM-button, to send a PM, this is right beneath "Your inbox is empty" message:
Warning: Invalid argument supplied for foreach() in /public_html/mydomain/wp-content/sp-resources/forum-plugins/private-messaging/library/sp-pm-database.php on line 167
Don't know if there is further warnings around in my forum, but these are the two I have noticed so far.
Any suggestions?
good to hear on the site and forum! thanks for the kind words!
as to the first error, not sure why or how you are getting that... since I have development version handy, can you confirm in your version, that line 41 is here:
if ($spProfileUser->buddies) {
foreach ($spProfileUser->buddies as $buddy) {
not sure how you get that error since there is a check for existence... have you added any buddies yet?
same for second one too... verifying that line 167 is
foreach ($buddies as $buddy) {
there is also a check for that too...
so lets step back... please look in your database... lets look at the sfmembers table... the buddies column... for your user, what do you have in there?
Visit Cruise Talk Central and Mr Papa's World
I have not added buddies in simple:press, but I did have some buddies in the phpbb-version.
Yes, in the first one - on line 40:
line 40: if ($spProfileUser->buddies) {
line 41: foreach ($spProfileUser->buddies as $buddy) {
The second one:
line 167 foreach ($buddies as $buddy) {
line 168 $buddylist[$x] = new stdClass();
The warning-message in the PM-section:
Apparently, the error does not come up for regular members, as I have a couple of test members who are not admins, but they come out for admins.
The warining-message for sp-pm-buddies-form.php shows for everyone (apparently) I havent logged into all of my user's accounts
so lets step back… please look in your database… lets look at the sfmembers table… the buddies column… for your user, what do you have in there?
It has a "1" in it, for everyone, at least the first 500 users.
a 1??? dont see how that is possible... would either be null, empty array or an array... quite odd - and of course singular report...
that wont mean or do anything...
can you change them to:
a:0:{}
Visit Cruise Talk Central and Mr Papa's World
yes... of course that will empty out an buddies they might have...
Visit Cruise Talk Central and Mr Papa's World
actually, for a query, you will want
UPDATE wp_sfmembers SET buddies='a:0:{}'
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)