Skip to content

Commit efebecf

Browse files
committed
format_comment() empty return
1 parent 7ef816f commit efebecf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/functions.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,16 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
314314
global $lang_functions;
315315
global $CURUSER, $SITENAME, $BASEURL;
316316
global $tempCode, $tempCodeCount;
317+
if ($text == '') {
318+
return "";
319+
}
317320
$enableattach_attachment = get_setting('attachment.enableattach');
318321
$tempCode = array();
319322
$tempCodeCount = 0;
320323
$imageresizer = $imageresizer ? 1 : 0;
321324
$s = $text;
322325

323-
if ($strip_html && !is_null($s)) {
326+
if ($strip_html) {
324327
$s = htmlspecialchars($s);
325328
}
326329

0 commit comments

Comments
 (0)