From: stephen@cubedesigners.com Date: Thu, 9 Nov 2017 15:11:52 +0000 (+0000) Subject: Fix #1789 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ff9c8b00b416c2210af2b47677fa7aed4172ba27;p=fluidbook-v3.git Fix #1789 @1 --- diff --git a/framework/application/views/helpers/HomeServices.php b/framework/application/views/helpers/HomeServices.php index 39342df..b4b0613 100644 --- a/framework/application/views/helpers/HomeServices.php +++ b/framework/application/views/helpers/HomeServices.php @@ -54,15 +54,18 @@ class Fluidbook_View_Helper_HomeServices extends Fluidbook_View_Helper_HomeLayer if ($example['exemple']) { $model = Fluidbook_Model_Reference::findOneById($example['exemple']); - $ex = $model->unserialize(); - if ($ex->hasUrl()) { - $res .= $this->linkTruePopupFullscreen(__('Voir le Fluidbook'), $ex->getFinalUrl(), ['class' => 'button']); - } + if ($model) { + $ex = $model->unserialize(); + + if ($ex->hasUrl()) { + $res .= $this->linkTruePopupFullscreen(__('Voir le Fluidbook'), $ex->getFinalUrl(), ['class' => 'button']); + } + } } $res = $this->htmlElement($res, 'div', ['class' => 'inner']); // Wrapper for vertical centering return $this->htmlElement($res, 'div', ['class' => 'more']); } -} \ No newline at end of file +}