From f747883b55a6aad37d6836f31f61cf62f69cf55e Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 19 Jan 2022 17:32:30 +0100 Subject: [PATCH] wip #4804 --- src/Search/Page.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Search/Page.php b/src/Search/Page.php index 535d9f0..e75556b 100644 --- a/src/Search/Page.php +++ b/src/Search/Page.php @@ -22,7 +22,12 @@ class Page */ public function getHighlights(): array { - return json_decode(file_get_contents($this->_path . '/p' . $this->_documentPage . '.fby'), false, 512, JSON_THROW_ON_ERROR); + try { + return json_decode(file_get_contents($this->_path . '/p' . $this->_documentPage . '.fby'), false, 512, JSON_THROW_ON_ERROR); + }catch (JsonException $e){ + + } + return []; } /** -- 2.39.5