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
|
// couldn't recognize it, try to return a time
|
||||||
if ((int) $time > 0)
|
$time = (int) $string;
|
||||||
return (int) $time;
|
if ($time > 0)
|
||||||
|
return $time;
|
||||||
else
|
else
|
||||||
return time();
|
return time();
|
||||||
}
|
}
|
||||||
|
@@ -23,8 +23,9 @@ function smarty_make_timestamp($string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// couldn't recognize it, try to return a time
|
// couldn't recognize it, try to return a time
|
||||||
if ((int) $time > 0)
|
$time = (int) $string;
|
||||||
return (int) $time;
|
if ($time > 0)
|
||||||
|
return $time;
|
||||||
else
|
else
|
||||||
return time();
|
return time();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user