mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix smarty_make_timestamp() failed to process DateTime objects properly
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
- added chaining to Smarty_Internal_Data so $smarty->assign('a',1)->assign('b',2); is possible now
|
||||
- bugfix remove race condition when a custom resource did change timestamp during compilation
|
||||
- bugfix variable property did not work on objects variable in template
|
||||
- bugfix smarty_make_timestamp() failed to process DateTime objects properly
|
||||
|
||||
26.09.2011
|
||||
- bugfix repeated calls to same subtemplate did not make use of cached template object
|
||||
|
@@ -20,7 +20,7 @@ function smarty_make_timestamp($string)
|
||||
// use "now":
|
||||
return time();
|
||||
} elseif ($string instanceof DateTime) {
|
||||
return $string->source->timestamp;
|
||||
return $string->getTimestamp();
|
||||
} elseif (strlen($string) == 14 && ctype_digit($string)) {
|
||||
// it is mysql timestamp format of YYYYMMDDHHMMSS?
|
||||
return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),
|
||||
|
Reference in New Issue
Block a user