浏览代码

[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;
     }