Skip to content

Commit

Permalink
Syntax adjustment
Browse files Browse the repository at this point in the history
Signed-off-by: tswagger <[email protected]>
  • Loading branch information
tswagger committed Sep 15, 2023
1 parent 7b74e7e commit 317c88f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Filters/HmacAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')]);
Expand Down

0 comments on commit 317c88f

Please sign in to comment.