From 62380a3086980e79470771dbca3e63b64c66cd56 Mon Sep 17 00:00:00 2001 From: onli Date: Sun, 6 Jun 2021 12:32:23 +0200 Subject: [PATCH] PHP 8 compat fix for showing freetag RSS feeds --- rss.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rss.php b/rss.php index 4c301701..c805199e 100644 --- a/rss.php +++ b/rss.php @@ -12,13 +12,13 @@ if ($serendipity['cors']) { header('Access-Control-Allow-Origin: *'); // Allow RSS feeds to be read by javascript } -$version = $_GET['version']; +$version = $_GET['version'] ?? ''; $description = $serendipity['blogDescription']; $title = $serendipity['blogTitle']; $comments = FALSE; if (empty($version)) { - list($version) = serendipity_discover_rss($_GET['file'], $_GET['ext']); + list($version) = serendipity_discover_rss($_GET['file'] ?? null, $_GET['ext'] ?? null); } else { # be sure it is an allowed version, to prevent attackers sniffing for unrelated files on the file system $allowed_versions = ['opml1.0', '0.91', '1.0', '2.0', 'atom0.3', 'atom1.0'];