Hi,

I installed Global Redirect today, and found that I get this error:

warning: Invalid argument supplied for foreach() in /home/dianet/public_html/modules/og/og.module on line 70.

Drupal 4.7.3, Global Redirect 1.1.2.3, and OG 1.110.2.139.

I also tried it after running this patch - http://drupal.org/node/88053 - and the same error occurs.

Any ideas?

thanks,
blue

Comments

nicholasthompson’s picture

I've never used OG - so I dont know what could cause this... I'll try to look into it asap.

bluecobalt’s picture

Thanks Nicholas,

A lot of developers use OG, and I'm sure would be interested in using Global Redirect with it.

thanks,
blue

nicholasthompson’s picture

well, I've looked at OG and I see no reason whatsoever for Global Redirect to break it - especially on line 70.

Line 70 of the file and version you refer to is:

    foreach ($user->og_groups as $key => $sub) {

Global Redirect doesn't touch the $user object, let alone the og_groups array.

Could this be a bug in OG that, for some reason, never showed up before?

bluecobalt’s picture

Thanks Nicholas,

I had the same error come up when I installed another module. I posted a bug report on OG. http://drupal.org/node/91950

peace,
blue

Christefano-oldaccount’s picture

I'm not sure what the deal is, but I'm getting the same error. In my case, it appeared immediately after enabling globalredirect module and going to an aliased node.

Invalid argument supplied for foreach() in /srv/www/sites/default/modules/og/og.module on line 70.

I've posted this to http://drupal.org/node/91950 as well.

nicholasthompson’s picture

Priority: Normal » Minor
Status: Active » Closed (won't fix)

No reports on this for a while... I assume its been fixed?