]> _ Git - fluidbook_tools.git/commitdiff
wip #4804
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 19 Jan 2022 16:32:30 +0000 (17:32 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 19 Jan 2022 16:32:30 +0000 (17:32 +0100)
src/Search/Page.php

index 535d9f059ce937088a91ff089c288d5d81aecb8f..e75556baef9dc7b86570bb0666cd3c087d06c250 100644 (file)
@@ -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 [];
     }
 
     /**