diff --git a/application/Espo/Core/Authentication/AuthToken/EspoManager.php b/application/Espo/Core/Authentication/AuthToken/EspoManager.php index a697af0796..29572ec5bd 100644 --- a/application/Espo/Core/Authentication/AuthToken/EspoManager.php +++ b/application/Espo/Core/Authentication/AuthToken/EspoManager.php @@ -52,7 +52,7 @@ class EspoManager implements Manager /** @var RDBRepository */ $repository = $entityManager->getRDBRepository(AuthTokenEntity::ENTITY_TYPE); - + $this->repository = $repository; } @@ -169,7 +169,10 @@ class EspoManager implements Manager } if (function_exists('openssl_random_pseudo_bytes')) { - return bin2hex(openssl_random_pseudo_bytes($length)); + /** @var string */ + $randomValue = openssl_random_pseudo_bytes($length); + + return bin2hex($randomValue); } throw new RuntimeException("Could not generate token.");