From 7132ef4c000fd9ee201219e87709a4da8127d2d2 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 5 Nov 2023 20:24:07 +0900 Subject: [PATCH] Fix type error when null is passed to cut_str() https://xetown.com/questions/1793588 --- common/legacy.php | 1 + 1 file changed, 1 insertion(+) diff --git a/common/legacy.php b/common/legacy.php index 63807df53..5f8c52d12 100644 --- a/common/legacy.php +++ b/common/legacy.php @@ -435,6 +435,7 @@ function isSiteID($domain): bool */ function cut_str($string, $cut_size = 0, $tail = '...'): string { + $string = (string)$string; if($cut_size < 1 || !$string) { return $string;