From 665495b94b20c6990fb86f7819794e024a1c9ed7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 10 Sep 2018 16:17:12 +0300 Subject: [PATCH] cache_media: only touch() local file if it's writable --- classes/rssutils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/rssutils.php b/classes/rssutils.php index bffc41c6..094b2940 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -1218,7 +1218,7 @@ class RSSUtils { if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) { file_put_contents($local_filename, $file_content); } - } else { + } else if (is_writable($local_filename)) { touch($local_filename); } } @@ -1254,7 +1254,7 @@ class RSSUtils { if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) { file_put_contents($local_filename, $file_content); } - } else { + } else if (is_writable($local_filename)) { touch($local_filename); } } -- 2.39.2