From 3b1ffd87afd4f6ea1bbf3a7992c72cee9c7f3b08 Mon Sep 17 00:00:00 2001 From: lucmuller Date: Tue, 19 Jul 2022 15:55:58 +0200 Subject: [PATCH] @is_file and filesize correction @is_file and file_size should be given the full server path of the file. --- Classes/Plugin/TtNews.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Plugin/TtNews.php b/Classes/Plugin/TtNews.php index d2476f5..09da324 100644 --- a/Classes/Plugin/TtNews.php +++ b/Classes/Plugin/TtNews.php @@ -2185,9 +2185,9 @@ protected function getFileLinks(&$markerArray, $row) if ($this->theCode == 'XML') { $theFile = $filesPath . $val; - if (@is_file($theFile)) { + if (@is_file(Environment::getPublicPath().$theFile)) { $fileURL = $this->config['siteUrl'] . $theFile; - $fileSize = filesize($theFile); + $fileSize = filesize(Environment::getPublicPath().$theFile); $fileMimeType = $this->getMimeTypeByHttpRequest($fileURL); $rss2Enclousres .= '