From dd6d9b159e1d3e660c995f560a3d954aa891e34c Mon Sep 17 00:00:00 2001 From: rodneyrehm Date: Thu, 7 Jun 2012 13:01:58 +0000 Subject: [PATCH] bugfix treat "0000-00-00" as 0 in modifier.date_format (Issue 103) --- change_log.txt | 1 + libs/plugins/modifier.date_format.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index e3727a8f..01147e33 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== trunk ===== 07.06.2012 - bugfix fetch() and display() with relative paths (Issue 104) +- bugfix treat "0000-00-00" as 0 in modifier.date_format (Issue 103) 24.05.2012 - bugfix Smarty_Internal_Write_File::writeFile() could cause race-conditions on linux systems (Issue 101) diff --git a/libs/plugins/modifier.date_format.php b/libs/plugins/modifier.date_format.php index 3cca7d39..f3eaba05 100644 --- a/libs/plugins/modifier.date_format.php +++ b/libs/plugins/modifier.date_format.php @@ -35,7 +35,7 @@ function smarty_modifier_date_format($string, $format=null, $default_date='', $f * Include the {@link shared.make_timestamp.php} plugin */ require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php'); - if ($string != '') { + if ($string != '' && $string != '0000-00-00' && $string != '0000-00-00 00:00:00') { $timestamp = smarty_make_timestamp($string); } elseif ($default_date != '') { $timestamp = smarty_make_timestamp($default_date);