I got the following error enabling your firestats module:

Warning: Invalid argument supplied for foreach() in /home/martin/public_html/modules/firestats/firestats.module on line 105

Warning: Cannot modify header information - headers already sent by (output started at /home/martin/public_html/modules/firestats/firestats.module:105) in /home/martin/public_html/includes/common.inc on line 269

I commented out lines 104 to 108 and the error went away. I then configured firestats and uncommented them. Everything works fine now. I suspect that what is missing is that you need to have a value for the variable firestats_role_disable before the following code works properly; you could either fix the code, or insert the variable at install time.

Comments

Gurpartap Singh’s picture

Title: Enabling firestats blows up my site » Wrong #default_value for disabled roles var.
Priority: Critical » Normal

Try changing the line:

$roles_disabled_for = variable_get('firestats_role_disable', '');

to

$roles_disabled_for = variable_get('firestats_role_disable', array());

and replace the same for default_value in settings forms. Will put this up in cvs soon. Thanks!

CdSAdmin’s picture

Hello there, i have the same problem.

When you said:

replace the same for default_value in settings forms, what do you mean please.
Sorry, but i'm pretty new in drupal code, give

For the moment i disabled the module firestats, my users (more than 1500 !) don't have FireFox anyway.

Thanks.
Dav

Gurpartap Singh’s picture

CdSAdmin’s picture

Hello,

Yes no Warning any more for those two lines of code, but it still the same issue for IE (see: http://drupal.org/node/101066), when i enable firestats module, under IE 6.0.2800 that's blank, but it work perfectly under FireFox.

The php_error.log :

[12-Dec-2006 11:06:43] PHP Fatal error: Call to undefined function arg() in C:\blah blah blah\modules\firestats.module on line 113

Is it related.

Strange that in Firefox it working fine but not in IE 6.0.+

Any ideas ?

Anonymous’s picture

Status: Fixed » Closed (fixed)