I see this error on my site.
Warning: array_sum() expects parameter 1 to be array, string given in _googleanalytics_visibility_roles() (line 501 of /Applications/MAMP/htdocs/mysite/sites/all/modules/contrib/google_analytics/googleanalytics.module).

Anyone having the same. Will look at it when having time to check where it comes from.

Comments

phoenix’s picture

When looking at $roles, after this code:
$roles = variable_get('googleanalytics_roles', array());
I see it contains this:
a:7:{i:4;s:1:"4";i:5;s:1:"5";i:1;i:0;i:2;i:0;i:3;i:0;i:6;i:0;i:7;i:0;}

phoenix’s picture

Status: Active » Closed (fixed)

Apparently the variable that was stored wasn't right. I did set the roles again and saved it. Then the error disappeared.
Now the variable contains this:
a:7:{i:1;i:0;i:2;i:0;i:3;i:0;i:4;i:0;i:5;i:0;i:6;i:0;i:7;i:0;}
And $roles now is an array.