diff --git a/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php b/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php index b83645dc61971771b8ce86e1587730adf77c1834..d274556700e557a37c4faa1cef244243c503ad50 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php +++ b/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php @@ -1173,7 +1173,10 @@ class MultiBackend extends AbstractBase $source = $this->defaultDriver; } if (!$source) { - return false; + // If we can't determine the source, assume we are capable to handle + // the request. This might happen e.g. when the user hasn't yet done + // a catalog login. + return true; } $driver = $this->getDriver($source); diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php index 428ea8005f4e44e05faab9dd0c224246e05ca74f..822577ea5823407e386132254f453e31a250da6f 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php @@ -2228,11 +2228,11 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase $methodReturn = $driver->supportsMethod('getStatus', $patron); $this->assertTrue($methodReturn); - //Case: The method doesn't exists in any of the drivers - //Result: A return of false + //Case: No parameters are given + //Result: A return of true - $methodReturn = $driver->supportsMethod('fail', null); - $this->assertFalse($methodReturn); + $methodReturn = $driver->supportsMethod('getStatus', null); + $this->assertTrue($methodReturn); //Case: getLoginDrivers and getDefaultLoginDriver are always supported //Result: A return of true