mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
update timestamp plugin to work when passed a timestamp
This commit is contained in:
@@ -23,8 +23,9 @@ function smarty_make_timestamp($string)
|
||||
}
|
||||
|
||||
// couldn't recognize it, try to return a time
|
||||
if ((int) $time > 0)
|
||||
return (int) $time;
|
||||
$time = (int) $string;
|
||||
if ($time > 0)
|
||||
return $time;
|
||||
else
|
||||
return time();
|
||||
}
|
||||
|
@@ -23,8 +23,9 @@ function smarty_make_timestamp($string)
|
||||
}
|
||||
|
||||
// couldn't recognize it, try to return a time
|
||||
if ((int) $time > 0)
|
||||
return (int) $time;
|
||||
$time = (int) $string;
|
||||
if ($time > 0)
|
||||
return $time;
|
||||
else
|
||||
return time();
|
||||
}
|
||||
|
Reference in New Issue
Block a user