mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
bugfix treat "0000-00-00" as 0 in modifier.date_format (Issue 103)
This commit is contained in:
@@ -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)
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user