diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Backend.php index 2ff160bc46ac2e4ec17457bda16d21d83e17f334..ca34144ca205d20c7d410d9c8ce3c08711702158 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Backend.php @@ -107,11 +107,13 @@ class Backend extends AbstractBackend $e ); } + $results = isset($response['data']) && is_array($response['data']) + ? $response['data'] : []; $collection = $this->createRecordCollection( [ 'offset' => $offset, - 'recordCount' => count($response['data']), - 'data' => array_slice($response['data'], $offset, $limit) + 'recordCount' => count($results), + 'data' => array_slice($results, $offset, $limit) ] ); $this->injectSourceIdentifier($collection);