mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 02:14:26 +02:00
fixed bug in smarty_make_timestamp introduced in PHP 4.1.0
This commit is contained in:
1
NEWS
1
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)
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user