[Security] fixed cast

This commit is contained in:
Fabien Potencier 2011-12-07 20:44:38 +01:00
parent acbbe8ac7f
commit b7fd5198ec

View File

@ -63,7 +63,11 @@ class SecurityContext implements SecurityContextInterface
$this->token = $this->authenticationManager->authenticate($this->token);
}
return $this->accessDecisionManager->decide($this->token, (array) $attributes, $object);
if (!is_array($attributes)) {
$attributes = array($attributes);
}
return $this->accessDecisionManager->decide($this->token, $attributes, $object);
}
/**