From 317c88feb57c3a88aa099f079d3c22454e7fbefe Mon Sep 17 00:00:00 2001 From: tswagger Date: Fri, 15 Sep 2023 18:22:14 -0500 Subject: [PATCH] Syntax adjustment Signed-off-by: tswagger --- src/Filters/HmacAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Filters/HmacAuth.php b/src/Filters/HmacAuth.php index c67c6ef97..f655d0264 100644 --- a/src/Filters/HmacAuth.php +++ b/src/Filters/HmacAuth.php @@ -32,7 +32,7 @@ public function before(RequestInterface $request, $arguments = null) $result = $authenticator->attempt($requestParams); - if (! $result->isOK() || ($arguments !== null && count($arguments) > 0 && $result->extraInfo()->hmacTokenCant($arguments[0]))) { + if (! $result->isOK() || ($arguments !== null && $arguments !== [] && $result->extraInfo()->hmacTokenCant($arguments[0]))) { return service('response') ->setStatusCode(Response::HTTP_UNAUTHORIZED) ->setJSON(['message' => lang('Auth.badToken')]);