Closed (fixed)
Project:
FireStats
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2006 at 19:33 UTC
Updated:
26 Dec 2006 at 16:16 UTC
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
Comment #1
Gurpartap Singh commentedTry 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!
Comment #2
CdSAdmin commentedHello 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
Comment #3
Gurpartap Singh commentedSee changes:
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/firestats/fir...
Comment #4
CdSAdmin commentedHello,
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 ?
Comment #5
(not verified) commented