Permalink
Browse files

[Security] fixed cast

  • Loading branch information...
1 parent 8432044 commit d2bdba5c73733dbc45153658584f16b57126090c @fabpot fabpot committed Dec 7, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 Core/SecurityContext.php
View
@@ -63,7 +63,11 @@ public function __construct(AuthenticationManagerInterface $authenticationManage
$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);
}
/**

0 comments on commit d2bdba5

Please sign in to comment.