fix: no results returned

This commit is contained in:
Guillermo Pages
2021-09-01 09:53:28 +02:00
parent 88d8ceed0b
commit 62ac0b2512

View File

@@ -179,8 +179,7 @@ class BookSearch
$books = array(); $books = array();
if(isset($results['response']['docs']) && is_array($results['response']['docs'])) { if(isset($results['response']['docs']) && is_array($results['response']['docs'])) {
foreach($results['response']['docs'] as $r) { foreach($results['response']['docs'] as $r) {
if (!isset($r['id'])) continue; $books[] = $r;
$books[$r['id']] = $r;
} }
} }