update format smarty plugin

This commit is contained in:
Manuel Raynaud
2013-09-09 11:07:14 +02:00
parent 51731017bd
commit 54dd496f52

View File

@@ -113,9 +113,15 @@ class Format extends AbstractSmartyPlugin
throw new SmartyPluginException("number is a mandatory parameter in format_number function");
}
$number = $params["number"];
if(empty($number)) {
return "";
}
$lang = $this->request->getSession()->getLang();
$number = $params["number"];
$decimals = array_key_exists("decimals", $params) ? $params["decimals"] : $lang->getDecimals();
$decPoint = array_key_exists("dec_point", $params) ? $params["dec_point"] : $lang->getDecimalSeparator();
$thousandsSep = array_key_exists("thousands_sep", $params) ? $params["thousands_sep"] : $lang->getThousandsSeparator();