Преглед на файлове

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