From fc6101b7dd6d8f3547018ebca08e0978c070d2a7 Mon Sep 17 00:00:00 2001 From: Ere Maijala <ere.maijala@helsinki.fi> Date: Mon, 19 Mar 2018 18:39:51 +0200 Subject: [PATCH] Catch ILS exceptions in getILSPatron. (#1148) --- module/VuFind/src/VuFind/View/Helper/Root/Auth.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Auth.php b/module/VuFind/src/VuFind/View/Helper/Root/Auth.php index 958580bd340..91f9db39f2c 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Auth.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Auth.php @@ -27,6 +27,7 @@ */ namespace VuFind\View\Helper\Root; +use VuFind\Exception\ILS as ILSException; use Zend\View\Exception\RuntimeException; /** @@ -152,7 +153,11 @@ class Auth extends \Zend\View\Helper\AbstractHelper */ public function getILSPatron() { - return $this->ilsAuthenticator->storedCatalogLogin(); + try { + return $this->ilsAuthenticator->storedCatalogLogin(); + } catch (ILSException $e) { + return false; + } } /** -- GitLab