diff options
| author | 2022-09-20 12:03:46 +0200 | |
|---|---|---|
| committer | 2022-09-20 12:03:46 +0200 | |
| commit | 97fc0bc95e8bdc593bb4a4ae65aa632df708af9c (patch) | |
| tree | 10f5a6a11c5aeb0964d1c21ebf6d2003e88cf2e5 /lib/lib_rss.php | |
| parent | 6dc611db2b57810d2cd51b927f70c6181324e1f6 (diff) | |
GLOB_BRACE is not available on all platforms (#4628)
https://php.net/glob
#fix https://github.com/FreshRSS/FreshRSS/issues/4627
Improvement of https://github.com/FreshRSS/FreshRSS/pull/4220
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 7a7a28225..592ad8149 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -332,7 +332,8 @@ function sanitizeHTML($data, string $base = '', $maxLength = false) { } function cleanCache(int $hours = 720) { - $files = glob(CACHE_PATH . '/*.{html,spc}', GLOB_BRACE | GLOB_NOSORT); + // N.B.: GLOB_BRACE is not available on all platforms + $files = array_merge(glob(CACHE_PATH . '/*.html', GLOB_NOSORT), glob(CACHE_PATH . '/*.spc', GLOB_NOSORT)); foreach ($files as $file) { if (substr($file, -10) === 'index.html') { continue; |
