From ec877b91aa03052af04b8b59223c06d0927bb947 Mon Sep 17 00:00:00 2001 From: Hajo Seng Date: Tue, 13 Apr 2021 14:52:32 +0200 Subject: [PATCH] Correction of wrong parameter types in exception handling (#1915) --- module/VuFind/src/VuFind/ILS/Driver/PAIA.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/VuFind/src/VuFind/ILS/Driver/PAIA.php b/module/VuFind/src/VuFind/ILS/Driver/PAIA.php index 1e22f414021..b05f9997c97 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/PAIA.php +++ b/module/VuFind/src/VuFind/ILS/Driver/PAIA.php @@ -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 @@ -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. @@ -1013,7 +1013,7 @@ protected function paiaHandleErrors($array) default: throw new ILSException( $array['error_description'] ?? $array['error'], - $array['code'] ?? '' + (int)($array['code'] ?? 0) ); } }