From b51ab12766140f4fad0e1e04e2229dd2702b3ff5 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Wed, 29 Apr 2020 19:04:31 +0000 Subject: [PATCH] unbreak tests: starting from PHP 7.4, $algo is no longer an int but mixed --- lib/SimpleSAML/Utils/Crypto.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/SimpleSAML/Utils/Crypto.php b/lib/SimpleSAML/Utils/Crypto.php index b118b6ee2..9f104139c 100644 --- a/lib/SimpleSAML/Utils/Crypto.php +++ b/lib/SimpleSAML/Utils/Crypto.php @@ -317,7 +317,7 @@ class Crypto * This function hashes a password with a given algorithm. * * @param string $password The password to hash. - * @param int $algorithm The algorithm to use. Defaults to the system default + * @param mixed $algorithm The algorithm to use. Defaults to the system default * * @return string The hashed password. * @throws \InvalidArgumentException If the input parameter is not a string. @@ -328,7 +328,7 @@ class Crypto * @author Dyonisius Visser, TERENA <visser@terena.org> * @author Jaime Perez, UNINETT AS <jaime.perez@uninett.no> */ - public static function pwHash(string $password, int $algorithm = PASSWORD_DEFAULT): string + public static function pwHash(string $password, $algorithm = PASSWORD_DEFAULT): string { if (!is_string($hash = password_hash($password, $algorithm))) { throw new InvalidArgumentException('Error while hashing password.'); -- GitLab