From ff9c8b00b416c2210af2b47677fa7aed4172ba27 Mon Sep 17 00:00:00 2001 From: "stephen@cubedesigners.com" Date: Thu, 9 Nov 2017 15:11:52 +0000 Subject: [PATCH] Fix #1789 @1 --- .../application/views/helpers/HomeServices.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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 +} -- 2.39.5