From 8cd1d623e51b66fc9ac81f34b6cc76fe351052d1 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Fri, 15 Nov 2013 17:13:50 +0100 Subject: [PATCH] // Fix error if default blockbanner image is missing --- modules/blockbanner/blockbanner.php | 3 ++- modules/blockbanner/blockbanner.tpl | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/blockbanner/blockbanner.php b/modules/blockbanner/blockbanner.php index 68f4eafee..d0685ec70 100644 --- a/modules/blockbanner/blockbanner.php +++ b/modules/blockbanner/blockbanner.php @@ -64,7 +64,8 @@ class BlockBanner extends Module { if (!$this->isCached('blockbanner.tpl', $this->getCacheId())) { - $this->smarty->assign('banner_img', Configuration::get('BLOCKBANNER_IMG')); + if (file_exists(_PS_MODULE_DIR_.'blockbanner'.DIRECTORY_SEPARATOR.Configuration::get('BLOCKBANNER_IMG'))) + $this->smarty->assign('banner_img', Configuration::get('BLOCKBANNER_IMG')); $this->smarty->assign('banner_link', Configuration::get('BLOCKBANNER_LINK')); $this->smarty->assign('banner_desc', Configuration::get('BLOCKBANNER_DESC')); $sql = 'SELECT COUNT(*) diff --git a/modules/blockbanner/blockbanner.tpl b/modules/blockbanner/blockbanner.tpl index 3e26f8647..23e946eef 100644 --- a/modules/blockbanner/blockbanner.tpl +++ b/modules/blockbanner/blockbanner.tpl @@ -26,11 +26,15 @@