diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php index 0c1f2f564ee68abcfe055438ad108627718d60a0..815f0bae5f565e04660ffea3d0987ead71c076e3 100644 --- a/module/VuFind/src/VuFind/Controller/MyResearchController.php +++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php @@ -945,7 +945,7 @@ class MyResearchController extends AbstractBase */ protected function getDriverForILSRecord($current) { - $id = $current['id'] ?? null; + $id = $current['id'] ?? ''; $source = $current['source'] ?? DEFAULT_SEARCH_BACKEND; $record = $this->serviceLocator->get('VuFind\Record\Loader') ->load($id, $source, true); diff --git a/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php b/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php index f85770dc16e045f042375dfb747b05096650dd34..da34ab73981f7e5b9f38bd4f259a4ff605c6f08e 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php +++ b/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php @@ -4,7 +4,7 @@ * * PHP version 7 * - * Copyright (C) The National Library of Finland 2012-2017. + * Copyright (C) The National Library of Finland 2012-2018. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -493,7 +493,7 @@ class MultiBackend extends AbstractBase implements \Zend\Log\LoggerAwareInterfac */ public function getRenewDetails($checkoutDetails) { - $source = $this->getSource($checkoutDetails['id']); + $source = $this->getSource($checkoutDetails['id'] ?? ''); $driver = $this->getDriver($source); if ($driver) { $details = $driver->getRenewDetails( @@ -883,7 +883,7 @@ class MultiBackend extends AbstractBase implements \Zend\Log\LoggerAwareInterfac public function getCancelHoldDetails($holdDetails) { $source = $this->getSource( - $holdDetails['id'] ? $holdDetails['id'] : $holdDetails['item_id'] + $holdDetails['id'] ?? $holdDetails['item_id'] ?? '' ); $driver = $this->getDriver($source); if ($driver) { @@ -965,7 +965,7 @@ class MultiBackend extends AbstractBase implements \Zend\Log\LoggerAwareInterfac */ public function getCancelStorageRetrievalRequestDetails($details) { - $source = $this->getSource($details['id']); + $source = $this->getSource($details['id'] ?? ''); $driver = $this->getDriver($source); if ($driver && $this->methodSupported( @@ -1172,9 +1172,7 @@ class MultiBackend extends AbstractBase implements \Zend\Log\LoggerAwareInterfac */ public function getCancelILLRequestDetails($details) { - $source = $this->getSource( - $details['id'] ? $details['id'] : $details['item_id'] - ); + $source = $this->getSource($details['id'] ?? $details['item_id'] ?? ''); $driver = $this->getDriver($source); if ($driver && $this->methodSupported(