Archived
1
0

some PHP functions expect strings and crash otherwise

This commit is contained in:
Thomas Heidrich
2017-02-07 21:13:51 +01:00
parent 55ec5e4ab4
commit 7a0a9e2156
3 changed files with 12 additions and 3 deletions
+2 -2
View File
@@ -363,8 +363,8 @@ function serendipity_printComments($comments, $parentid = 0, $depth = 0, $trace
if ($parentid === VIEWMODE_LINEAR || !isset($comment['parent_id']) || $comment['parent_id'] == $parentid) {
$i++;
$comment['comment'] = serendipity_specialchars(strip_tags($comment['body']));
$comment['url'] = strip_tags($comment['url']);
$comment['comment'] = (is_string($comment['body']) ? serendipity_specialchars(strip_tags($comment['body'])) : '');
$comment['url'] = (is_string($comment['url']) ? strip_tags($comment['url']) : '');
$comment['link_delete'] = $serendipity['baseURL'] . 'comment.php?serendipity[delete]=' . $comment['id'] . '&serendipity[entry]=' . $comment['entry_id'] . '&serendipity[type]=comments&' . $formToken;
/* Fix invalid cases in protocoll part */