// DisplayDate don't have to 'die' if date == '0000-00-00'

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11344 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte committed 2011-12-19 10:14:42 +00:00
1 parent 9688e7741f
commit d33fcc2da6
1 file changed
+5 -1
+5 -1
View File
@@ -558,8 +558,12 @@ class ToolsCore
{ {
if (!$date || !($time = strtotime($date))) if (!$date || !($time = strtotime($date)))
return $date; return $date;
if ($date == '0000-00-00 00:00:00' || $date == '0000-00-00')
return '';
if (!Validate::isDate($date) || !Validate::isBool($full)) if (!Validate::isDate($date) || !Validate::isBool($full))
die (self::displayError('Invalid date')); throw new PrestashopException('Invalid date');
$context = Context::getContext(); $context = Context::getContext();
$date_format = ($full ? $context->language->date_format_full : $context->language->date_format_lite); $date_format = ($full ? $context->language->date_format_full : $context->language->date_format_lite);