From 7ef816f52c34cf627b18d08b8619931fac0dbe94 Mon Sep 17 00:00:00 2001 From: xiaomlove <1939737565@qq.com> Date: Mon, 20 Jan 2025 13:35:38 +0800 Subject: [PATCH] fix trim htmlspecialchars null param --- include/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions.php b/include/functions.php index 601a862a..77329b5c 100644 --- a/include/functions.php +++ b/include/functions.php @@ -320,7 +320,7 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab = $imageresizer = $imageresizer ? 1 : 0; $s = $text; - if ($strip_html) { + if ($strip_html && !is_null($s)) { $s = htmlspecialchars($s); } @@ -2537,7 +2537,7 @@ if ($CURUSER){ foreach ($icons as $icon) { ?> - +