mirror of
https://github.com/friendica/friendica
synced 2024-12-23 10:40:16 +00:00
Merge pull request #791 from fabrixxm/quietcron
clear_cache() check if cache dir is writable before opening it
This commit is contained in:
commit
ad7f6aedb4
1 changed files with 2 additions and 0 deletions
2
boot.php
2
boot.php
|
@ -2156,6 +2156,7 @@ function clear_cache($basepath = "", $path = "") {
|
|||
if ($cachetime == 0)
|
||||
$cachetime = 86400;
|
||||
|
||||
if (is_writable($path)){
|
||||
if ($dh = opendir($path)) {
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
$fullpath = $path."/".$file;
|
||||
|
@ -2166,6 +2167,7 @@ function clear_cache($basepath = "", $path = "") {
|
|||
}
|
||||
closedir($dh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function set_template_engine(&$a, $engine = 'internal') {
|
||||
|
|
Loading…
Reference in a new issue