From: Vincent Vanwaelscappel Date: Wed, 19 Jan 2022 16:32:30 +0000 (+0100) Subject: wip #4804 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f747883b55a6aad37d6836f31f61cf62f69cf55e;p=fluidbook_tools.git wip #4804 --- 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 []; } /**