From 426d58fdbc902a18b14247161b683712f3de3b6e Mon Sep 17 00:00:00 2001 From: mzeros Date: Sat, 2 Nov 2024 15:49:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E7=AD=BE=E5=90=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gateway/service/AuthService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/gateway/service/AuthService.php b/app/gateway/service/AuthService.php index 5c4f051..c06f602 100644 --- a/app/gateway/service/AuthService.php +++ b/app/gateway/service/AuthService.php @@ -34,12 +34,12 @@ class AuthService { if ($sign_type == 2) { $type = 'md5'; - $request['token'] = isset($request['token']) ? $request['token'] : $token; + $request['token'] = $request['token'] ?? $token; } else { $type = 'sha1'; - $request['time'] = isset($request['time']) ? $request['time'] : self::timestamp(); - $request['nonce'] = isset($request['nonce']) ? $request['nonce'] : self::nonce(); - $request['token'] = isset($request['token']) ? $request['token'] : self::token($token); + $request['time'] = $request['time'] ?? self::timestamp(); + $request['nonce'] = $request['nonce'] ?? self::nonce(); + $request['token'] = $request['token'] ?? self::token($token); } if(isset($request['version'])){ $request['sign'] = self::signature($request, $type);