I've been successfully using User Badges for a few weeks but can't seem to get rid of this pesky foreach() error I receive on my user profile pages.

warning: Invalid argument supplied for foreach() in /usr/local/apache2/htdocs/drupal/modules/user_badges/user_badges.module on line 178.

I am using Drupal 5.5 with PostgreSQL.

Any clues?

Comments

heine’s picture

Does this only happen on user profiles of users without badges?

WISEOZ’s picture

Okay, I've done some extensive testing and have narrowed it down to a very specific scenario ...

The error only occurs with the MySite module for the $owner of the page. So, I have the user profile viewable through MySite and when I visit my own MySite page, I see the error. When I visit any other user's pages, I do not see the error. I confirmed this is happening consistently but it is this specific.

I'll open a support request with the MySite module owner as well to see if they have a solution for us.

WISEOZ’s picture

Status: Active » Closed (fixed)

Good news for you!

The fix was required on the MySite side. This issue was resolved with a patch from Agent Rickard, the MySite module owner.