drupal 4.4.1
debian sarge

when posting events on one drupal instance, we get:
warning: Invalid argument supplied for foreach() in
/var/www/potomacalliance.us/modules/subscriptions.module on line 192.

(whether or not the 'subscribe' checkbox is checked)

I can get around this by enclosing the offending line:
foreach ($node->taxonomy as $tid){
$strsent = $strsent . subscriptions_mailvars ($tid, $nid, $user->uid, "taxa", $strsent);
}

in an if ($node->taxonomy) {

but, is that the right thing to do? what would that break?
What would cause the message to begin with? (It seems to be 'mostly' harmless - though disconcerting to the users)

Comments

Steven’s picture

Subscriptions was probably intended to be used on forums, where taxonomy terms are always present. So it's a bug, and your change should fix it correctly.