Message is: warning: Invalid argument supplied for foreach() in /home/pflug/public_html/praecedo/modules/user.module on line 977.

Comments

ax’s picture

this isn't really helpful. please provide more information. what were you trying to do? at which url? with what permissions? do you have contributed modules enabled? themes? did you upgrade from an earlier version? did you run update.php? which php version? os? ...

i had a quick glance on the code and couldn't find a possible reason for this. i don't get this warning ...

bryanpflug’s picture

Sorry - should have provided much better context.

I get the warning when I try to edit any user account via administer->accounts->edit account, i.e. /admin/user/edit/1. This is an upgrade from 4.3.2 to 4.4, on a system running Linux Kernel version 2.4.23-grsec , Apache version 1.3.28, PHP version 4.3.3, and MySQL version 4.0.18-standard. I'm attempting the access from user 1, with contributed modules enabled, and with the administrator having all permissions checked.

However, unchecking and rechecking all modules appears to have cleared up the problem!

bryanpflug’s picture

badlop’s picture

I experience the same problem on a Drupal 4.3.2 updated to 4.4.0 and on a new Drupal 4.4.0. The problem disappears when you uncheck the module 'jabber'.

It seems the 'jabber' module has not been updated to Drupal 4.4.0, and it's not included in the official package. It cannot be found on Drupal CVS (well, it's stored on the attic). It cannot be found on the contributions repository.

It's a shame the jabber authentication module cannot be used on Drupal 4.4.0, since it's a nice feature for Drupal. It's really handy for Jabber related sites powered by Drupal, for example www.jabberes.org and tkabber.jabber.ru.

The exact text is: Warning: Invalid argument supplied for foreach() in /usr/local/www/data-dist/drupal/modules/user.module on line 977

So this is not a Drupal bug, but a jabber.module task: update to Drupal 4.4.0

Anonymous’s picture

This is due to the fact that the jabber_user(..) hook in 4.4 needs to return an array instead of flat content. i.e.:

Instead of:

  return $content;

Use:

  return array('jabber'=>$content);