Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction of wrong parameter types in exception handling #1915

Merged
merged 5 commits into from Apr 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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