fix: mobile 文章列表发布时间问题

This commit is contained in:
2025-06-21 10:21:32 +08:00
parent 72565683c8
commit 1873e6ac3a
2 changed files with 2 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ if (!function_exists('date_format_i18n')) {
* @param bool $keep_time 是否保留时间
* @return string
*/
function date_format_i18n(int|string $datetime, string $lang = '', bool $keep_time = false): string
function date_format_i18n(int|string|null $datetime, string $lang = '', bool $keep_time = false): string
{
// 处理语言标识,若未提供则使用当前语言设置,并转换为小写
$lang = $lang ?: Lang::getLangSet();