function.array-diff problems!
- by SKY
Hi, im currently getting these error on my site:
Warning: array_keys() [function.array-keys]: The first argument should be an array on line 43
Warning: Invalid argument supplied for foreach() on line 44
Warning: array_diff() [function.array-diff]: Argument #1 is not an array on line 47
Warning: array_diff() [function.array-diff]: Argument #1 is not an array on line 48
And the source are:
42. $tmp = $this->network->get_user_follows($this->user->id);
43. $tmp = array_keys($tmp->followers);
44. foreach($tmp as &$v) { $v = intval($v); }
45. $tmp2 = array_keys($this->network->get_group_members($g->id));
46. foreach($tmp2 as &$v) { $v = intval($v); }
47. $tmp = array_diff($tmp, $tmp2);
48. $tmp = array_diff($tmp, array(intval($this->user->id)));
I want to know what is the problem and how i fix it. Thanks!