From 814a53d1f28b1e3ab00b7d4041c57474a1d01e41 Mon Sep 17 00:00:00 2001 From: Sergio Mendolia Date: Fri, 13 Oct 2023 17:41:58 +0200 Subject: [PATCH] fix correct key --- src/Repository/BookRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Repository/BookRepository.php b/src/Repository/BookRepository.php index 427e5259..2500cbbc 100644 --- a/src/Repository/BookRepository.php +++ b/src/Repository/BookRepository.php @@ -140,7 +140,7 @@ private function convertResults(mixed $intermediateResults): array foreach ($intermediateResults as $result) { foreach ($result['item'] as $item) { $key = ucwords(strtolower($item), Book::UCWORDS_SEPARATORS); - if (!array_key_exists($item, $results)) { + if (!array_key_exists($key, $results)) { $results[$key] = [ 'item' => $key, 'bookCount' => 0,