Hi,
I received this error message when I viewed the page as an anonymous user,

warning: Invalid argument supplied for foreach() in /home/username/where/drupal_5_5/sites/all/modules/tagadelic/tagadelic.module on line 285.

However, when I logged in as admin or authenticated user, it returns a normal working page. Please let me know if this has been solved or needs more info.

Thanks

Comments

pfaocle’s picture

Title: Error - Invalid argument, when viewed as an anonymous user » Error - Invalid argument when viewed as an anonymous user
Version: 5.x-1.0-rc1 » 5.x-1.0
Status: Active » Postponed (maintainer needs more info)

First up, are you affected by this with the 5.x-1,0 release? Second, which page is causing grief?

Looks like theme_tagadelic_weighted($terms) is gettings an empty $terms variable and not checking it before foreach'ing over it? Simple solution would be to check whether the parameter passed is empty, not sure if this is the best bet tho.

cwatson’s picture

I'm having this same problem, but only when I use the Community Tags module to add a tag to a node, and only when I'm logged in as a user type other than administrator.

The error: warning: Invalid argument supplied for foreach() in drupal/modules/tagadelic/tagadelic.module on line 285.

my setup: Drupal 5.5; MySQL 5.0.22; PHP 5.1.6

Bèr Kessels’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)