Fix #19041: Fix PHP 8.1 issues

This commit is contained in:
Alexander Makarov
2022-01-14 13:52:01 +03:00
committed by GitHub
parent 4bd551d143
commit 1271bc419f
49 changed files with 162 additions and 53 deletions

View File

@ -298,7 +298,7 @@ class Security extends Component
public function hkdf($algo, $inputKey, $salt = null, $info = null, $length = 0)
{
if (function_exists('hash_hkdf')) {
$outputKey = hash_hkdf($algo, $inputKey, $length, $info, $salt);
$outputKey = hash_hkdf((string)$algo, (string)$inputKey, $length, (string)$info, (string)$salt);
if ($outputKey === false) {
throw new InvalidArgumentException('Invalid parameters to hash_hkdf()');
}