mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24: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)
|
- fixed bug with cached insert debug timing (Monte)
|
||||||
- added 'script' attribute to {insert..} which specifies the script that
|
- added 'script' attribute to {insert..} which specifies the script that
|
||||||
the insert function can be found in. (Andrei)
|
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)
|
function smarty_make_timestamp($string)
|
||||||
{
|
{
|
||||||
|
if(empty($string)) {
|
||||||
|
$string = "now";
|
||||||
|
}
|
||||||
$time = strtotime($string);
|
$time = strtotime($string);
|
||||||
if (is_numeric($time) && $time != -1)
|
if (is_numeric($time) && $time != -1)
|
||||||
return $time;
|
return $time;
|
||||||
@@ -125,7 +128,7 @@ function smarty_make_timestamp($string)
|
|||||||
return $time;
|
return $time;
|
||||||
}
|
}
|
||||||
|
|
||||||
// can decipher, must be timestamp already?
|
// can't decipher, just return it
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user