* Return empty string when the time is empty.

This commit is contained in:
daitingting
2022-06-06 07:46:12 +00:00
parent 32fb4bc372
commit 53b1eabf0e
+1 -1
View File
@@ -285,7 +285,7 @@ function formatTime($time, $format = '')
{
$time = str_replace('0000-00-00', '', $time);
$time = str_replace('00:00:00', '', $time);
if(trim($time) == '') return ;
if(trim($time) == '') return '';
if($format) return date($format, strtotime($time));
return trim($time);
}