Fixed exception if module content is empty
This commit is contained in:
@@ -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 "";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user