From 936af2ec918937c863c2529154a5eedc510215b1 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Fri, 25 Oct 2013 10:43:40 +0200 Subject: [PATCH] return empty value instead of throwing an exception for format_date smarty function --- core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php index 01491e6fd..25aac76b4 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) { - throw new SmartyPluginException("date is a mandatory parameter in format_date function"); + return ''; } if (!$date instanceof \DateTime) {