Skip to content
Snippets Groups Projects
Commit 5e31fbed authored by Demian Katz's avatar Demian Katz
Browse files

Fix bug: error on blank BrowZine search.

parent c5580dc6
No related merge requests found
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment