From 0d8c4f97a1a551f18030dc8bf06c1ca1af0bb952 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Fri, 25 Oct 2013 10:54:53 +0200 Subject: [PATCH] return empty value instead of throwing an exception for format_number smarty function --- core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php index 25aac76b4..aa4aacc9e 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php @@ -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 == '') {