|
@@ -60,6 +60,7 @@ class Redis extends Driver
|
|
|
protected function getEncryptedToken($token)
|
|
|
{
|
|
|
$config = \think\Config::get('token');
|
|
|
+ $token = $token ?? ''; // 为兼容 php8
|
|
|
return $this->options['tokenprefix'] . hash_hmac($config['hashalgo'], $token, $config['key']);
|
|
|
}
|
|
|
|