Skip to content

Commit

Permalink
Correction of wrong parameter types in exception handling (#1915)
Browse files Browse the repository at this point in the history
  • Loading branch information
hajoseng authored and demiankatz committed Apr 13, 2021
1 parent 3a7439f commit ec877b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions module/VuFind/src/VuFind/ILS/Driver/PAIA.php
Expand Up @@ -954,7 +954,7 @@ protected function paiaHandleErrors($array)
case 'access_denied':
throw new AuthException(
$array['error_description'] ?? $array['error'],
$array['code'] ?? ''
(int)($array['code'] ?? 0)
);

// invalid_grant 401 The access token was missing, invalid
Expand All @@ -966,7 +966,7 @@ protected function paiaHandleErrors($array)
case 'insufficient_scope':
throw new ForbiddenException(
$array['error_description'] ?? $array['error'],
$array['code'] ?? ''
(int)($array['code'] ?? 0)
);

// not_found 404 Unknown request URL or unknown patron.
Expand Down Expand Up @@ -1013,7 +1013,7 @@ protected function paiaHandleErrors($array)
default:
throw new ILSException(
$array['error_description'] ?? $array['error'],
$array['code'] ?? ''
(int)($array['code'] ?? 0)
);
}
}
Expand Down

0 comments on commit ec877b9

Please sign in to comment.