mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-02 13:36:15 -05:00
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
This commit is contained in:
committed by
GitHub
parent
6dc611db2b
commit
97fc0bc95e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user