return empty value instead of throwing an exception for format_date

smarty function
This commit is contained in:
Manuel Raynaud
2013-10-25 10:43:40 +02:00
parent 2bec1d8193
commit 936af2ec91

View File

@@ -73,7 +73,7 @@ class Format extends AbstractSmartyPlugin
$date = $this->getParam($params, "date", false);
if ($date === false) {
throw new SmartyPluginException("date is a mandatory parameter in format_date function");
return '';
}
if (!$date instanceof \DateTime) {