diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php index d10b938bf0..99bc3d6d8f 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php @@ -41,7 +41,7 @@ abstract class AbstractToken implements TokenInterface if (\is_string($role)) { $role = new Role($role); } elseif (!$role instanceof RoleInterface) { - throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, Role instances, but got %s.', \gettype($role))); + throw new \InvalidArgumentException(sprintf('$roles must be an array of strings or Role instances, but got %s.', \gettype($role))); } $this->roles[] = $role;