Fix for PHP 8

main
Pk11 2 years ago
parent 07a81d6414
commit ffdfb15148

@ -250,8 +250,8 @@
if(!empty($row['comment'])) { if(!empty($row['comment'])) {
$comment = $row['comment']; $comment = $row['comment'];
$comment = preg_replace('/^&gt;(?!&gt;\d).+/m', '<strong class="quote">$0</strong>', $comment); $comment = preg_replace('/^&gt;(?!&gt;\d).+/m', '<strong class="quote">$0</strong>', $comment);
$comment = preg_replace('/(?:https?|mailto|tel|ftp):[^\s]+/m', '<a href="$0" target="_blank">$0</a>', $comment); $comment = preg_replace('/(?:https?|mailto|tel|ftp):[^\s,]+/m', '<a href="$0" target="_blank">$0</a>', $comment);
$comment = preg_replace_callback('/&gt;&gt;\s*(\d+)/', quote_link, $comment); $comment = preg_replace_callback('/&gt;&gt;\s*(\d+)/', 'quote_link', $comment);
$comment = str_replace("\n", "<br />", $comment); $comment = str_replace("\n", "<br />", $comment);
echo "<div>$comment</div>"; echo "<div>$comment</div>";
} }

@ -63,7 +63,7 @@
$comment = $row['comment']; $comment = $row['comment'];
$comment = preg_replace('/^&gt;(?!&gt;\d).+/m', '<strong>$0</strong>', $comment); $comment = preg_replace('/^&gt;(?!&gt;\d).+/m', '<strong>$0</strong>', $comment);
$comment = preg_replace('/(?:https?|mailto|tel|ftp):[^\s]+/m', '<a href="$0">$0</a>', $comment); $comment = preg_replace('/(?:https?|mailto|tel|ftp):[^\s]+/m', '<a href="$0">$0</a>', $comment);
$comment = preg_replace_callback('/&gt;&gt;\s*(\d+)/', quote_link, $comment); $comment = preg_replace_callback('/&gt;&gt;\s*(\d+)/', 'quote_link', $comment);
$comment = str_replace("\n", "<br />", $comment); $comment = str_replace("\n", "<br />", $comment);
} }

Loading…
Cancel
Save