From bf49549002a6fd34b6da386d2aa6786cd132f31a Mon Sep 17 00:00:00 2001 From: Guillermo Pages Date: Wed, 1 Sep 2021 10:00:48 +0200 Subject: [PATCH] fix: set back to original with isset test --- src/BookSearch/BookSearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BookSearch/BookSearch.php b/src/BookSearch/BookSearch.php index a683419..51e4d6e 100644 --- a/src/BookSearch/BookSearch.php +++ b/src/BookSearch/BookSearch.php @@ -180,7 +180,7 @@ class BookSearch if(isset($results['response']['docs']) && is_array($results['response']['docs'])) { foreach($results['response']['docs'] as $r) { if (!isset($r['id'])) continue; - $books[] = $r; + $books[$r['id']] = $r; } }