From e141080309f6556853383cb9bccde49c956df9e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 21 Feb 2025 10:46:48 +0800 Subject: [PATCH] Update common.php --- plugin/think-library/src/common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/think-library/src/common.php b/plugin/think-library/src/common.php index c4d00a8e0..44600ce62 100644 --- a/plugin/think-library/src/common.php +++ b/plugin/think-library/src/common.php @@ -453,10 +453,10 @@ if (!function_exists('format_datetime')) { return '-'; } elseif (is_numeric($datetime)) { return date(lang($format), intval($datetime)); - } elseif ($timestamp = strtotime($datetime)) { + } elseif ($timestamp = strtotime((string)$datetime)) { return date(lang($format), $timestamp); } else { - return $datetime; + return (string)$datetime; } } } \ No newline at end of file