return empty value instead of throwing an exception for format_number

smarty function
This commit is contained in:
Manuel Raynaud
2013-10-25 10:54:53 +02:00
parent 3c4525d6d6
commit 0d8c4f97a1

View File

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