diff --git a/module/VuFind/src/VuFind/ILS/Logic/Holds.php b/module/VuFind/src/VuFind/ILS/Logic/Holds.php index 54f4524a8adc61c9b4cca1529f25ce9e0d160a07..507fd5d1256db25f8d21787eb28f5de17aa8f941 100644 --- a/module/VuFind/src/VuFind/ILS/Logic/Holds.php +++ b/module/VuFind/src/VuFind/ILS/Logic/Holds.php @@ -281,7 +281,8 @@ class Holds if ($holdConfig) { // Is this copy holdable / linkable if (!$requestsBlocked - && isset($copy['addLink']) && $copy['addLink'] + && ($copy['addLink'] ?? false) + && ($copy['is_holdable'] ?? true) ) { $copy['link'] = $this->getRequestDetails( $copy, $holdConfig['HMACKeys'], 'Hold' @@ -363,10 +364,7 @@ class Holds } // If a valid holdable status has been set, use it to // determine if a hold link is created - $addlink = isset($copy['is_holdable']) - ? ($addlink && $copy['is_holdable']) : $addlink; - - if ($addlink) { + if ($addlink && ($copy['is_holdable'] ?? true)) { if ($holdConfig['function'] == "getHoldLink") { /* Build opac link */ $holdings[$location_key][$copy_key]['link']