From c952c20ff0ca460441702ed1996f416eb5df189d Mon Sep 17 00:00:00 2001 From: mrothauer Date: Tue, 24 Oct 2023 12:03:26 +0200 Subject: [PATCH] fix double // --- templates/Blogs/rss/feed.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/Blogs/rss/feed.php b/templates/Blogs/rss/feed.php index 94c7d42d7..c813b60d9 100644 --- a/templates/Blogs/rss/feed.php +++ b/templates/Blogs/rss/feed.php @@ -25,8 +25,9 @@ if (!empty($post->photos)) { $imageUrl = $this->Html->getThumbs800ImageMultiple($post->photos[0]->name); - $length = filesize(WWW_ROOT . $imageUrl); - $mimeType = mime_content_type(WWW_ROOT . $imageUrl); + $correctedImageUrl = str_replace('//', '/', WWW_ROOT . $imageUrl); + $length = filesize($correctedImageUrl); + $mimeType = mime_content_type($correctedImageUrl); $preparedItem['enclosure'] = ['url' => $imageUrl, 'length' => $length, 'type' => $mimeType]; }