diff --git a/includes/flag/flag_flag.inc b/includes/flag/flag_flag.inc index 14368a8..82fb1c7 100644 --- a/includes/flag/flag_flag.inc +++ b/includes/flag/flag_flag.inc @@ -491,11 +491,12 @@ class flag_flag { // Allow modules to disallow (or allow) access to flagging. $access_array = module_invoke_all('flag_access', $this, $entity_id, $action, $account); - - foreach ($access_array as $set_access) { - if (isset($set_access)) { - $access = $set_access; - } + if (in_array(FALSE, $access_array, TRUE)) { + // FALSE is returned immediately. No need to continue. + return FALSE; + } + elseif (in_array(TRUE, $access_array, TRUE)) { + $access = TRUE; } return $access;