Skip to content

Commit

Permalink
fix double //
Browse files Browse the repository at this point in the history
  • Loading branch information
mrothauer committed Oct 24, 2023
1 parent f9c122b commit c952c20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions templates/Blogs/rss/feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down

0 comments on commit c952c20

Please sign in to comment.