diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php index 8d5c384fe718ce67d44d060192552a9e84b3de90..88c458d53fc40d01f8494e719ede99dfb9b07b5a 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php +++ b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php @@ -717,19 +717,18 @@ class KohaRest extends \VuFind\ILS\Driver\AbstractBase implements */ public function getPickUpLocations($patron = false, $holdDetails = null) { - $bibId = $holdDetails['id']; + $bibId = $holdDetails['id'] ?? null; $itemId = $holdDetails['item_id'] ?? false; - $level = isset($holdDetails['level']) && !empty($holdDetails['level']) - ? $holdDetails['level'] : 'copy'; - if ('copy' === $level && false === $itemId) { - return []; - } $requestType = array_key_exists('StorageRetrievalRequest', $holdDetails ?? []) ? 'StorageRetrievalRequests' : 'Holds'; $included = null; - if ('Holds' === $requestType) { + if ($bibId && 'Holds' === $requestType) { // Collect library codes that are to be included + $level = !empty($holdDetails['level']) ? $holdDetails['level'] : 'title'; + if ('copy' === $level && false === $itemId) { + return []; + } if ('copy' === $level) { $result = $this->makeRequest( [