From ffdfb15148b667a6d2b8d60421a84be6098ab3bc Mon Sep 17 00:00:00 2001 From: Pk11 Date: Sun, 12 Feb 2023 06:01:02 +0000 Subject: [PATCH] Fix for PHP 8 --- index.php | 4 ++-- rss.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 18b4bbe..14250e9 100644 --- a/index.php +++ b/index.php @@ -250,8 +250,8 @@ if(!empty($row['comment'])) { $comment = $row['comment']; $comment = preg_replace('/^>(?!>\d).+/m', '$0', $comment); - $comment = preg_replace('/(?:https?|mailto|tel|ftp):[^\s]+/m', '$0', $comment); - $comment = preg_replace_callback('/>>\s*(\d+)/', quote_link, $comment); + $comment = preg_replace('/(?:https?|mailto|tel|ftp):[^\s,]+/m', '$0', $comment); + $comment = preg_replace_callback('/>>\s*(\d+)/', 'quote_link', $comment); $comment = str_replace("\n", "
", $comment); echo "
$comment
"; } diff --git a/rss.php b/rss.php index e2d55ba..9a2b37b 100644 --- a/rss.php +++ b/rss.php @@ -63,7 +63,7 @@ $comment = $row['comment']; $comment = preg_replace('/^>(?!>\d).+/m', '$0', $comment); $comment = preg_replace('/(?:https?|mailto|tel|ftp):[^\s]+/m', '$0', $comment); - $comment = preg_replace_callback('/>>\s*(\d+)/', quote_link, $comment); + $comment = preg_replace_callback('/>>\s*(\d+)/', 'quote_link', $comment); $comment = str_replace("\n", "
", $comment); }