소스 검색

[Security] fixes a possible bug when username is an integer

Johannes M. Schmitt 14 년 전
부모
커밋
971ff8175f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php

+ 1 - 1
src/Symfony/Component/Security/Acl/Domain/UserSecurityIdentity.php

@@ -40,7 +40,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface
             throw new \InvalidArgumentException('$class must not be empty.');
         }
 
-        $this->username = $username;
+        $this->username = (string) $username;
         $this->class = $class;
     }