From 37590b8077aa0fa6749c867751d894800e9f84c6 Mon Sep 17 00:00:00 2001 From: adunn49 Date: Tue, 15 Oct 2024 09:51:25 +1300 Subject: [PATCH] Add check for indexing errors --- src/Service/Indexer.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Service/Indexer.php b/src/Service/Indexer.php index d4e8052..91a9ada 100644 --- a/src/Service/Indexer.php +++ b/src/Service/Indexer.php @@ -110,7 +110,12 @@ public function processNode(): void } } - if ($this->getIndexService()->hasIndexingErrors) { + // Check if we can determine errors were encountered during indexing + // and log warning if so. + if ( + property_exists($this->getIndexService(), 'hasIndexingErrors') + && $this->getIndexService()->hasIndexingErrors + ) { Injector::inst()->get(LoggerInterface::class)->warning( '[SEARCH SERVICE] Indexed with errors' );