diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Module.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Module.php index 1c6ab4fd1..23f9ed231 100755 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Module.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Module.php @@ -53,7 +53,11 @@ class Module extends AbstractSmartyPlugin } } } - return $template->fetch(sprintf("string:%s", $content)); + + if (! empty($content)) + return $template->fetch(sprintf("string:%s", $content)); + + return ""; } /** diff --git a/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php index 979642677..a673b805b 100644 --- a/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php @@ -155,6 +155,7 @@ class FormatTest extends \PHPUnit_Framework_TestCase * test formatDate without mandatory parameters * * @covers ::formatDate + * @expectedException Thelia\Core\Template\Smarty\Exception\SmartyPluginException */ public function testFormatDateWithoutDate() { diff --git a/templates/admin/default/ajax/thelia_news_feed.html b/templates/admin/default/ajax/thelia_news_feed.html index 360ca696b..fcc064ea9 100755 --- a/templates/admin/default/ajax/thelia_news_feed.html +++ b/templates/admin/default/ajax/thelia_news_feed.html @@ -7,7 +7,7 @@

- {$TITLE|strip_tags nofilter} - {format_date timestamp=$DATE} + {$TITLE|strip_tags nofilter} - {format_date timestamp=$DATE output='date'}