diff options
author | Andrew Dolgov <[email protected]> | 2018-09-10 16:17:12 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-09-10 16:17:12 +0300 |
commit | 665495b94b20c6990fb86f7819794e024a1c9ed7 (patch) | |
tree | 4312973b2a7e570150587e647df25ae6d628ce62 | |
parent | 4bb651a656bdddc25454554a4dfec6a8d10697a8 (diff) |
cache_media: only touch() local file if it's writable
-rwxr-xr-x | classes/rssutils.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php index bffc41c6f..094b29408 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); } } |