From 2df18499923e137b7aebe6baa6c84f23bd843c86 Mon Sep 17 00:00:00 2001
From: Ere Maijala <ere.maijala@helsinki.fi>
Date: Tue, 14 Feb 2017 19:25:19 +0200
Subject: [PATCH] =?UTF-8?q?Catch=20also=20exceptions=20from=20driverHold?=
 =?UTF-8?q?=20method=20so=20that=20the=20holdings=20display=20doesn?=
 =?UTF-8?q?=E2=80=99t=20crash=20on=20that.=20(#915)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php b/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php
index 191baaed745..aa9a33fb685 100644
--- a/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php
+++ b/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php
@@ -120,13 +120,13 @@ class TitleHolds
             } else if ($mode == 'driver') {
                 try {
                     $patron = $this->ilsAuth->storedCatalogLogin();
+                    if (!$patron) {
+                        return false;
+                    }
+                    return $this->driverHold($id, $patron);
                 } catch (ILSException $e) {
                     return false;
                 }
-                if (!$patron) {
-                    return false;
-                }
-                return $this->driverHold($id, $patron);
             } else {
                 try {
                     $patron = $this->ilsAuth->storedCatalogLogin();
-- 
GitLab