소스 검색

[Security] fixed cast

Fabien Potencier 13 년 전
부모
커밋
b7fd5198ec
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/Symfony/Component/Security/Core/SecurityContext.php

+ 5 - 1
src/Symfony/Component/Security/Core/SecurityContext.php

@@ -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);
     }
 
     /**