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

This commit is contained in:
mDeflotte committed 2011-12-19 10:14:42 +00:00
1 parent 60e5b7cc63
commit 0b282ba761
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);