Skip to content

Commit 7ef816f

Browse files
committed
fix trim htmlspecialchars null param
1 parent 3338f04 commit 7ef816f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
320320
$imageresizer = $imageresizer ? 1 : 0;
321321
$s = $text;
322322

323-
if ($strip_html) {
323+
if ($strip_html && !is_null($s)) {
324324
$s = htmlspecialchars($s);
325325
}
326326

@@ -2537,7 +2537,7 @@ function stdhead($title = "", $msgalert = true, $script = "", $place = "")
25372537
foreach ($icons as $icon) {
25382538

25392539
?>
2540-
<link rel="stylesheet" href="<?php echo htmlspecialchars(trim($icon['cssfile'], '/')).$cssupdatedate?>" type="text/css" />
2540+
<link rel="stylesheet" href="<?php echo htmlspecialchars(trim($icon['cssfile'] ?? '', '/')).$cssupdatedate?>" type="text/css" />
25412541
<?php
25422542
}}
25432543
}

0 commit comments

Comments
 (0)