diff --git a/NEWS b/NEWS index 615e507c..182f5607 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - fixed bug in smarty_make_timestamp introduced in PHP 4.1.0 (Monte) - fixed bug with cached insert debug timing (Monte) - added 'script' attribute to {insert..} which specifies the script that the insert function can be found in. (Andrei) diff --git a/Smarty.addons.php b/Smarty.addons.php index b83b13d0..790090d3 100644 --- a/Smarty.addons.php +++ b/Smarty.addons.php @@ -113,6 +113,9 @@ function smarty_mod_date_format($string, $format="%b %e, %Y") \*======================================================================*/ function smarty_make_timestamp($string) { + if(empty($string)) { + $string = "now"; + } $time = strtotime($string); if (is_numeric($time) && $time != -1) return $time; @@ -125,7 +128,7 @@ function smarty_make_timestamp($string) return $time; } - // can decipher, must be timestamp already? + // can't decipher, just return it return $string; }