]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5368 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Jul 2022 12:09:21 +0000 (14:09 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 21 Jul 2022 12:09:21 +0000 (14:09 +0200)
app/Models/FluidbookTranslate.php

index e090c191f46495b0767ce628a85630cdbe553aa5..320c41b1c90ad39c54eae65d9936d11732115891 100644 (file)
@@ -72,7 +72,11 @@ class FluidbookTranslate extends Translate
         start_measure('Get all fluidbook translations');
         if (null === self::$_allTranslations) {
             $t = FluidbookTranslate::find(1);
-            $json = json_decode($t->getRawOriginal('content_translatable'), true, 512, JSON_THROW_ON_ERROR);
+            try {
+                $json = json_decode($t->getRawOriginal('content_translatable'), true, 512, JSON_THROW_ON_ERROR);
+            }catch (\Exception $e){
+                $json=[];
+            }
 
             self::$_allTranslations = [];