? flag-user-access.patch Index: flag.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/flag/Attic/flag.inc,v retrieving revision 1.1.2.30.2.16 diff -u -p -r1.1.2.30.2.16 flag.inc --- flag.inc 28 Oct 2009 02:38:10 -0000 1.1.2.30.2.16 +++ flag.inc 28 Oct 2009 07:27:00 -0000 @@ -404,7 +404,7 @@ class flag_flag { return FALSE; } - $matched_roles = array_intersect($this->roles[$action], array_keys($account->roles)); + $matched_roles = !empty($this->roles[$action]) ? array_intersect($this->roles[$action], array_keys($account->roles)) : array(); return !empty($matched_roles) || $account->uid == 1; } @@ -615,7 +615,7 @@ class flag_flag { * * @private */ - function _is_flagged($content_id, $uid, $sid) { + function _is_flagged($content_id, $uid, $sid) { return db_result(db_query("SELECT fid FROM {flag_content} WHERE fid = %d AND uid = %d AND sid = %d AND content_id = %d", $this->fid, $uid, $sid, $content_id)); }